Troubleshooting of nginx errors: Difference between revisions

Jump to navigation Jump to search
m
(Created page with "Troubleshooting of Nginx Errors == Troubleshooting of Nginx Errors == === Nginx and Apache Server Conflict Troubleshooting Guide === '''Problem Overview''' When trying to access files through Nginx (such as <code>http://example.com/example_folder/example.png</code>), you encounter a 404 error, even though the file definitely exists on the server. '''Environment Overview''' * Operating System: Debian * Web Server: Nginx and Apache installed simultaneously * File Path...")
 
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
'''Problem Overview'''
'''Problem Overview'''


When trying to access files through Nginx (such as <code>http://example.com/example_folder/example.png</code>), you encounter a 404 error, even though the file definitely exists on the server.
When trying to access files through Nginx (such as {{kbd | key=<nowiki>http://example.com/example_folder/example.png</nowiki>}}), you encounter a 404 error, even though the file definitely exists on the server.


'''Environment Overview'''
'''Environment Overview'''
Line 97: Line 97:
=== Common Permission Issues ===
=== Common Permission Issues ===


If you still have access problems, check file permissions:
If you still have access problems, check file permissions: Ensure Nginx user can access the directory


<pre lang="bash">
<pre lang="bash">
= Ensure Nginx user can access the directory =
sudo chown -R www-data:www-data /usr/share/nginx/html/example_folder
sudo chown -R www-data:www-data /usr/share/nginx/html/example_folder
sudo chmod -R 755 /usr/share/nginx/html/example_folder
sudo chmod -R 755 /usr/share/nginx/html/example_folder

Navigation menu