DEV Community

Cover image for 4 mistakes that will bring any developer to tears😿 for Ispmanager

Posted on

4 mistakes that will bring any developer to tears😿

Once in a while, every site fires off this or that soulless error code, always a pleasure to deal with. To save you from straining your psychic powers trying to figure out what they mean, we have collected below the most common problems that bring sites down.

403 Forbidden

Error 403 (Forbidden) occurs when the server has accepted a request but refuses to process it. There are several common reasons for this.

The index.php or index.html file is missing. An index file is the title page of a file that the web server accesses by default when it receives a request. If the file is missing, the server will generate an error code instead of opening the site. The exact code depends on the server settings, but the most common error is “403 Forbidden.”

A trivial error, but one that is easy to fall into when in a rush to deploy the site. To avoid embarrassment, always check the location of the index file and whether its name is correct.

It is easy to check this from the "Sites" section of our control panel by opening the files for the desired domain.

ispmanagerThe line will show whether everything is ok with the index file. This will take about 10 seconds of your life when troubleshooting the site

Problems with access to the site by IP or authentication. This happens if the configuration file settings have restricted access to the site for a certain browser, country, or all IP addresses. This can be caused by protection against DDoS attacks or if the administrator forgot to reopen the site after repair. The web server will return the familiar 403 Forbidden error if the .htaccess or nginx.conf specifies something like:

Order Deny,Allow
Deny from all

Another problem may be incorrect authentication settings for accessing sections of the site. For example, if the path to the file containing the passwords is incorrect, you should check the lines:

AuthName "Protected area, need authorization”
AuthType Basic
AuthUserFile /home/t/test/.authfile
require valid-user

You can quickly rectify authentication or file access settings from the "Sites" section in ispmanager.

ispmanagerThere is a code editor in the control panel from which editing configs is really convenient

Access to the site’s files is denied in the web server config. The problem is a bit more serious if the web server settings specify that access to the site’s files is denied. If you're lucky, it may be due to an error in the web server configuration file. If not, you've probably caught a virus.

In the first case, check the contents of the configuration file, .htaccess for Apache or nginx.conf for nginx. If you have a masochistic streak, check out our article on how to make your website catch a virus.

IServer failureServer failure

500 Internal Server Error

“500 Internal Server Error” usually occurs due to problems in the server software. The reason is always server application failure or software conflicts.

Most often, the code occurs when there is a software version conflict. For example, when a site developed on PHP 5.6 tries to play with an OS running the current PHP 8.

If you can't find the problematic program right away, a journal with logs will be your only salvation.

IspmanagerThis is what the journal with logs looks like in ispmanager

Every error may require a unique, case-by-case solution. You can view logs from ispmanager in "Monitoring and logs" → "WWW request logs". Web server errors will be in the namesite.error.log file.

503 Service Unavailable

This one occurs when the server cannot cope with the load. The reason is simply that the server lacks physical resources.

Error 503 can occur during server maintenance, when software problems arise, or at peak load. For example, when a program is running inefficiently or during a software update or DDoS attack.

Error 503 has very particular causes, so the best solution is to check the access logs and monitor the server load. You should also set up at least basic DDoS protection, optionally through Cloudflare and DDoS-Guard services.

504 Gateway Timeout

This is a timeout error that occurs when the interval allotted to the server to process a given request expires. Since the period for processing the request has expired, the server has moved on to the next request.

Error 504 usually arises on shared hosting. To save resources, hosting providers often set the timeout too short so the server may not have time to process heavy requests. In this case, you should increase the timeout time for the web server or ask the helpdesk whether access to the configuration file is denied.

The web server may also return a 504 error if something prevents it from processing requests quickly. For example, when accessing a large database or a third-party server. In such cases, you will have to look for a bottleneck that slows the server down, so you can't get by without full-site diagnostics.

When the server has to choose which error code to returnWhen the server has to choose which error code to return

If website errors already haunt your dreams

Try the ispmanager control panel. It will help with site deployment and administration, and make your life a little easier.
Try ispmanager

Top comments (0)