Nginx webserver help
-
- New to forums
- Posts: 14
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat May 03, 2014 9:01 pm
Nginx webserver help
I recently installed nginx on my VDS to use as a redirect but sadly it seems that I can not access any directories when trying to access them it will give me a 404 error, I've tried googling this but has come up with no results as most things say to add some variables to a section of the config that does not seem to exist in mine
- Vanderburg
- Former staff
- Posts: 1253
- Joined: Sat Nov 13, 2010 7:27 am
- Location: Dallas, TX
Re: Nginx webserver help
Are you using the default directory for your files (may be /usr/share/nginx/www), or a different one that you set up in the sites-enabled files? Are you attempting to view the directoryindex, or a specific file in the folders?
-
- New to forums
- Posts: 14
- Joined: Sat May 03, 2014 9:01 pm
Re: Nginx webserver help
I'm using the default directory and I'm trying to view a directory indexVanderburg wrote:Are you using the default directory for your files (may be /usr/share/nginx/www), or a different one that you set up in the sites-enabled files? Are you attempting to view the directoryindex, or a specific file in the folders?
Re: Nginx webserver help
AFAIK directory indexes are disabled by default in nginx, but if you're getting a 404, then there's probably a different issue as if you view a directory without autoindex enabled and no index found/configured, you should be getting a 403. A good start would be checking/providing the default nginx log (/var/log/nginx/error.log, or similar) and perhaps provide the configuration you're using and the exact directory you're putting content into.
-
- New to forums
- Posts: 14
- Joined: Sat May 03, 2014 9:01 pm
Re: Nginx webserver help
It seems the error changed to a 403 after I restarted nginx and in the error log it tells me that the directory "/var/www/html/GarrysMod/" is forbidden
- Vanderburg
- Former staff
- Posts: 1253
- Joined: Sat Nov 13, 2010 7:27 am
- Location: Dallas, TX
Re: Nginx webserver help
You may just need to enable it, within the location brackets, in your sites-enabled file.
Code: Select all
location / {
autoindex on;
}