APACHE TROUBLESHOOTING TIPS

Share it:



APACHE TROUBLESHOOTING TIPS





ISSUE # 1 :- This site can’t be reached Or Unable to connect
  • Possibly Apache down. Pidof httpd
  • Restart Apache service >> stop & start
  • netstat -plane |grep :80 >> to confirm whether apache is running
  • Check whether apache conf syntax is correcthttpd configtest
  • Check Apache log >> find out the error message and trouble the issue according to the error message.
ISSUE # 2 :- 500 Internal Server Error
  • tail -f /usr/local/apache/log/error_log |grep USER >> user level
  • tail -f /usr/local/apache/log/error_log >> server level
  • Check .htaccess rewrite rules
ISSUE # 3 :- 500 error >> Blank Page
  • Check whether the size of index page is zero bytes
  • Correct files and folder ownership and permission
  • Check error_log in application.
  • If client uses php based application >> Enable php display_errors and refresh the site again >> trouble shoot the issue based on the error message.
  • Find the name of application installed in the site and search how to enable display_errors/debug mode/error notice for that particular application.
  • Rename modules/plugin folders and then refresh the page (F5 ) >> if its working, find out the problematic module/plugin
  • Change application theme/template
  • Check LMD event log
  • Check .htaccess rewrite rules
ISSUE # 4 :- 404 Not Found
  • Check whether the requested resource or contents exist in the path.
  • Check whether the user type in the wrong URL
  • Does the file exist in the correct location on the server? Was the resource was moved or deleted on the server?
  • Check whether the domain have correct DocumentRoot; check the apache config.
  • Check the ownership and permission of the file/folder.
  • Check whether the resource being accessed a symbolic link.
  • Check if there is any .htaccess file and rewrite rules.
  • Some CMS application’s resource calls from database, so you have to check the .htaccess has proper rewrite rules (permalink).
ISSUE # 5 :- 403 Forbidden Permission Denied
  • Check whether the domain has proper index page.
  • Check ownership and permission of files/folders
  • Check ownership and permission of /, /home, /home/user, /home/user/public_html
  • Check the domain’s vhost entries especially DocumentRoot in apache conf.
  • Check .htaccess file in the DocumentRoot and rewrite rules
ISSUE # 6 :- 401 Unauthorized
  • Check .htaccess and confirm that whether HTTP authentication is correct.
ISSUE # 7 :- 502 Bad Gateway
  • Check whether the reverse proxy is configured properly.
  • Check if the server has any additional proxy servers configured. Like nginx, varnish etc.
ISSUE # 8 :- 503 Service Unavailable
  • Probably this kind of error codes are directly related to CPU and Memory Usage.
  • In CloudLinux server, check Virtual memory, physical memory, CPU, number of entry processes limit, I/O limits etc..
ISSUE # 9 :- 508 Resource Limit Is Reached
  • In a CloudLinux installed server, each account has a predefined amount of resources. So check Virtual memory, physical memory, CPU, number of entry processes limit, I/O limits etc..
ISSUE # 10 :- 406 Error – Not Acceptable
  • This error code is mod_security related. So check apache logs,
grep USER /usr/local/apache/logs/error_log
ISSUE # 11 :- 504 Gateway Timeout
  • Check proxy server configuration.
ISSUE # 12 :- 509 Bandwidth Limit Exceeded
  • The server has exceeded the bandwidth specified by the server administrator. Check the BW usage of the domain.
ISSUE # 13 :- Error 310 (net::ERR_TOO_MANY_REDIRECTS)
  • Check the .htaccess file located in public_html or /home/User/
  • Rename modules/plugins folder
  • Check if there is any redirection specified in the index page.
ISSUE # 14 :- Apache: No space left on device: Couldn’t create accept lock
  • Apache shows as running, but unable to connect web server port. When we error logs, we can see error message like “No space left on device: Couldn’t create accept lock”.
  • There are many reasons behind this error,
1. Apache Semaphore:
           ipcs -s
For killing semaphore processes,
       for i in `ipcs -s | awk ‘/nobody/ {print $2}’`; do (ipcrm -s $i); done
     2. Check your disk space
     3. Review file system quotas
ISSUE # 15:- Apache downloads php files instead of displaying them
PHP handler issue.
  • Check .htaccess contents in the path of /home/User, Domain’s DocumentRoot
  • Check php handler value in domain’s virtual host or apache conf

ISSUE # 16 :- Domain Shows Apache Default Page
  • DNS and Apache IP address conflict. Check whether the DNS A record and Apache Vhost IP are same.
  • Check domain’s Vhost entries.
Share it:

Post A Comment:

0 comments: