Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
but then how would i get to that directory from the webpage that it initially starts up? – Simon Naude Sep 3 '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 3 '12 at 19:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.