Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.