Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Nginx autoindex on (Directory Index)

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
john_ukd
Posts: 4
Joined: Sun Jan 03, 2016 1:09 pm

Nginx autoindex on (Directory Index)
  • Quote

Post by john_ukd » Sun Jan 03, 2016 1:21 pm

Hi all.

I have decided to reinstall my Vesta CP and use Nginx only. I'm just trying to get things back to how I had them with Apache.
I have a sub domain, lets say sub.domain.com and I would like autoindex on for this sub domain.
I have created a conf file at /home/admin/conf/web/nginx.sub.domain.com.conf containing:

Code: Select all

autoindex on;
autoindex_exact_size off;
This makes it work at http://sub.domain.com/test/ but when I go to just http://sub.domain.com I get a 404. I presume its looking for an index file.

How can I use the 'nginx.sub.domain.com.conf' include file to do this?

Cheers, John.
Top

Elizine
Posts: 50
Joined: Wed Aug 12, 2015 12:11 pm
Contact:
Contact Elizine
Website

Re: Nginx autoindex on (Directory Index)
  • Quote

Post by Elizine » Thu Jan 07, 2016 12:07 pm

It seems like it was the symlink that was at fault here. When creating the symlink, use the full path instead of a relative path like so:

Code: Select all

ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enable/example.com
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password