Skip to content

Troubleshooting and solutions

By Tilo Schröder (external link) on
Last modified

Find out here what the most common errors mean and how to fix them.

Different 404 Pages

Depending on the requested URL, you may see different 404 pages. Requests such as /my-admin are passed to Symphony through the frontend rewrite and therefore return Symphony’s 404 page and also appear in the Symphony error log.

Requests for non-existent PHP files such as /my-login.php are handled directly by Nginx and return Nginx’s 404 page. These requests never reach Symphony and therefore do not appear in the Symphony error log.

Error 413 Request Entity Too Large

The error “Error 413 Request Entity Too Large“ occurs, when the uploaded file exceeds the maximum size limit configured in Nginx.

You can adjust the limits for both PHP-FPM and Nginx as described in “Upload limits“.

PHP downloaded instead of executed

If PHP files are downloaded by the browser instead of being executed, Nginx is not forwarding them to PHP-FPM. This may be caused by an incorrect fastcgi_pass setting or a missing location block.

See “Executing PHP Files“ for instructions on how to add the correct location block.

Error 404 after installation

If a 404 error appears during login after installation, the cause may be an incomplete set of rewrite rules for Symphony.

Check whether the “Rewrite Rules“ for Symphony have been fully inserted into the server block in the Nginx configuration file and whether Nginx has been reloaded.

Permission denied

When using Nginx as a web server, the error message “(13: Permission denied) while connecting to upstream” may appear when Nginx does not have permission to access the PHP-FPM socket or another upstream resource.

A good place to start is the Nginx error log:

              grep "denied" /var/log/nginx/error.log
            

Also check the ownership and permissions of the files and directories used by your application:

  • Directories 755
  • Files 644

For Sym8, make sure that the application files and directories belong to www-data:

              sudo chown -R www-data:www-data /var/www/html/example-domain.net
            

If the error refers to the PHP-FPM socket (defined in the location block for executing PHP files), check its ownership and permissions and make sure that the Nginx worker user is allowed to access it.

Error 502 Bad Gateway

I won’t document the “502 Bad Gateway” error here, since it can have so many different causes that covering them all would go beyond the scope of this page.

There are already countless helpful resources about this error in the search engine of your choice. 🙂