2. Apache. Check the web server.
Sometimes errors occur when you access your domain. Below are the most common problems and their solutions.
Errors:
403 Forbidden
403 Forbidden is HTTP status code in response to a client's request for a web page or resource to indicate that the server refuses to allow the requested page. In other words, the server is available, but refuses to grant access.
404 Not Found
The 404 Not Found error in the HTTP protocol says that the client can connect to the server, but the server can not find the requested document or it is configured to not perform this request and does not disclose the reason for denying access.
500 Internal Server Error
For the functioning of the script, three conditions must be fulfilled:
1) The directory containing the script must have authority that does not allow anyone other than the owner to write in it (usually 755). Fulfill this condition by following the command: chmod 755 / path / to / directories
2) The script must meet the same conditions. Command: chmod 755 / path / to / file.
3) The owner and folders and scripts should be the user who created this domain (if additional users are not created then this user is admin, group admin). Command: chown -R admin: admin / put / to / folder / with / scripts.
What exactly is wrong at this time can be seen through the command: tail / var / log / httpd / suexec_log
502 Bad Gateway
It arises when there is a server jamming, or an excessive number of joins or traffic increases.
503 Service Unavailable
The server is not up or overloaded. Rejected request. It occurs mainly when the user exceeds the limit of the request or the transmission of bytes.
How to restart Apache from the console
To restart the Apache Web server from the console, you must log in as a root via the SSH Server Console and enter the command: `which apachectl` restart
If you have Apache version 2 then: `which apache2ctl` restarts (on Debian based distros/etc/init.d/apache2 restart
)
How to restart Apache from the DirectAdmin panel
To restart the Apache Web server from the DirectAdmin panel, go to panel => Admin Tools and select the "Service Monitor" option.
Locate the "httpd" list in the list and click "Restart".
How to restart Apache from the Virtualmin + Webmin panel
To restart the Apache Web server from the Webmin panel, go to the panel, almost at the very end (down to the left), click on "System Information" and then expand the Status list and select "Restart Apache"