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.
- 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
- 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
- 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).
- 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
- Check .htaccess and confirm that whether HTTP authentication is correct.
- Check whether the reverse proxy is configured properly.
- Check if the server has any additional proxy servers configured. Like nginx, varnish etc.
- 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..
- 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..
- This error code is mod_security related. So check apache logs,
ISSUE # 11 :- 504 Gateway Timeout
- Check proxy server configuration.
- The server has exceeded the bandwidth specified by the server administrator. Check the BW usage of the domain.
- 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.
- 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,
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
- DNS and Apache IP address conflict. Check whether the DNS A record and Apache Vhost IP are same.
- Check domain’s Vhost entries.
Post A Comment:
0 comments: