0

I would like to use Nginx as a webserver on my Ubuntu 12.04 server, but i would also like to use it for file transfers.

I have been able to set it up as a webserver (very simple), and I have been able to set it up for file transfers (using autoindex on line), but i have not been able to do them both at the same time.

Is it possible to have Nginx act as a webserver, and then when you click a link it shows your file directories instead?

1 Answers1

0

If you want your server to autoload the index you need to have autoindex set to on, but it will not show you the directory contents, thus doing so you can both auto-access the index and browse the directory is not possible. But what you can do is have a location with your files like /somelocation that will have autoindex set to off and put all the files that you need to be able to download from there.

Logic Wreck
  • 1,420
  • 9
  • 8
  • but then how would i get to that directory from the webpage that it initially starts up? – Simon Naude Sep 03 '12 at 19:05
  • no you won't, the problem is that you either get the automatic index or the directory, you can't get both unfortunately. This is just a workaround so to make the files accessible in a different location on the same webserver and the index on the / location(main page) – Logic Wreck Sep 03 '12 at 19:27