Guest User

Untitled

a guest
Dec 4th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. $ sudo apachectl stop
  2. AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local
  3. AH00558: httpd: Could not reliably determine the server's fully
  4. qualified domain name, using 127.0.0.1. Set the 'ServerName' directive
  5. globally to suppress this message
  6. httpd (no pid file) not running
  7.  
  8. $ sudo lsof -i:80
  9. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
  10. httpd 3722 _www 4u IPv6 0x123456789abcdef 0t0 TCP *:http (LISTEN)
  11. httpd 3724 _www 4u IPv6 0x123456789abcdef 0t0 TCP *:http (LISTEN)
  12. httpd 3725 _www 4u IPv6 0x123456789abcdef 0t0 TCP *:http (LISTEN)
  13. httpd 56048 root 4u IPv6 0x123456789abcdef 0t0 TCP *:http (LISTEN)
  14. httpd 56055 _www 4u IPv6 0x123456789abcdef 0t0 TCP *:http (LISTEN)
  15.  
  16. $ apachectl status
  17. Go to http://localhost:80/server-status in the web browser of your choice.
  18. Note that mod_status must be enabled for this to work.
  19.  
  20. $ curl http://localhost:80/server-status
  21. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  22. <html><head>
  23. <title>403 Forbidden</title>
  24. </head><body>
  25. <h1>Forbidden</h1>
  26. <p>You don't have permission to access /server-status
  27. on this server.<br />
  28. </p>
  29. </body></html>
  30.  
  31. $ sudo nano /etc/apache2/httpd.conf
  32. $ sudo apachectl restart
  33. AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local
  34. AH00558: httpd: Could not reliably determine the server's fully
  35. qualified domain name, using 127.0.0.1. Set the 'ServerName' directive
  36. globally to suppress this message
  37.  
  38. ServerName localhost
  39.  
  40. LoadModule status_module libexec/apache2/mod_status.so
  41.  
  42. $ netstat -an | grep '.80' | grep -i Listen
  43. tcp46 0 0 *.80 *.* LISTEN
  44. $ sudo apachectl stop
  45. Password:
  46. $ apachectl status
  47. Go to http://localhost:80/server-status in the web browser of your choice.
  48. Note that mod_status must be enabled for this to work.
  49. $ netstat -an | grep '.80' | grep -i Listen
  50. $
  51.  
  52. $ ps aux | grep httpd | grep -v grep
  53. _www 45379 0.0 0.0 2509492 1084 ?? S 6:27PM 0:00.00 /usr/sbin/httpd -D FOREGROUND
  54. root 45376 0.0 0.1 2511540 11292 ?? Ss 6:27PM 0:00.19 /usr/sbin/httpd -D FOREGROUND
  55. $ sudo apachectl stop
  56. Password:
  57. $ ps aux | grep httpd | grep -v grep
  58. $
  59.  
  60. $ apachectl -S
  61. AH00557: httpd: apr_sockaddr_info_get() failed for GSSLA15122293
  62. AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
  63. VirtualHost configuration:
  64. *:80 myserver.example.com (/private/etc/apache2/extra/httpd-vhosts.conf:24)
  65. ServerRoot: "/usr"
  66. Main DocumentRoot: "/Library/WebServer/Documents"
  67. Main ErrorLog: "/private/var/log/apache2/error_log"
  68. Mutex proxy: using_defaults
  69. Mutex default: dir="/private/var/run/" mechanism=default
  70. Mutex mpm-accept: using_defaults
  71. Mutex proxy-balancer-shm: using_defaults
  72. PidFile: "/private/var/run/httpd.pid"
  73. Define: DUMP_VHOSTS
  74. Define: DUMP_RUN_CFG
  75. User: name="_www" id=70 not_used
  76. Group: name="_www" id=70 not_used
  77.  
  78. apachectl -t -D DUMP_INCLUDES
  79.  
  80. /usr/sbin/apachectl -t -D DUMP_INCLUDES
  81. /usr/sbin/apachectl start
Add Comment
Please, Sign In to add comment