NGINX Directory Browse Configuration on Windows

NGINX is a great web engine and very easy to get started with. In case you need to share files or make them available trough a web interface, all you need to do this, download the latest version of nginx and run it! It's that simple...

For a particular case, I needed to make some folders on my windows machine available so I could share these folder structures on the network (usually I use SMB shares with specific permissions but this was a particular case, don't ask why :) )

The Nginx configuration sits in the "conf" folder when
you download nginx and the file is called, "nginx.conf". Here you can set any specific settings that you want to apply to your nginx web server. For the purpose of my needs, I wanted to allow directory browsing to specific folder and sub-folders on my computer and all I had to do was include the below code in my configuration file.

        location /shared {
            alias "C:/tech/shared";
            autoindex on;
        }

So my configuration looked something like this;


Once the nginx started, I was able to browse http://x.x.x.x:8080/shared url and see all my directories under C:\tech\shared folder.






Comments

Popular posts from this blog

System.Messaging.MessageQueueException (0x80004005): A workgroup installation computer does not support the operation (Public Queue create issue)

Veeam Backup Error : Failed to prepare guest for hot backup. Error: VSSControl

warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead - Chef Development Kit Update