Nginx webserver help

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
ForrestMarkX
New to forums
New to forums
Posts: 14
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat May 03, 2014 9:01 pm

Nginx webserver help

Post by ForrestMarkX »

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
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: Nginx webserver help

Post by Vanderburg »

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?
ForrestMarkX
New to forums
New to forums
Posts: 14
Joined: Sat May 03, 2014 9:01 pm

Re: Nginx webserver help

Post by ForrestMarkX »

Vanderburg 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?
I'm using the default directory and I'm trying to view a directory index
User avatar
rymax99
This is my homepage
This is my homepage
Posts: 143
Joined: Sun Feb 02, 2014 2:08 pm
Location: Florida
Contact:

Re: Nginx webserver help

Post by rymax99 »

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.
ForrestMarkX
New to forums
New to forums
Posts: 14
Joined: Sat May 03, 2014 9:01 pm

Re: Nginx webserver help

Post by ForrestMarkX »

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
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: Nginx webserver help

Post by Vanderburg »

You may just need to enable it, within the location brackets, in your sites-enabled file.

Code: Select all

location / {
    autoindex on;
}
Post Reply