diff --git a/README.md b/README.md index 6f9c41afc700ed668eb58aa30698a05b2af42bcb..a7edd3f6376f2a8c3da42c1dc6a1e3d09755a63e 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,40 @@ __Try it out:__ [devcoster.com/betterlisting/demo](https://www.devcoster.com/bet - Write access to `/etc/nginx/sites-enabled/default` ## Installation: - - +1. Unzip BetterListing to your NGINX webroot so you end up with the following structure: + ``` +Web Root/ + |- betterlisting/ + |- index.html + |- robots.txt + |- downloads/ + |- etc. +``` +2. Open `top.html` found in `/betterlisting/` and input your sites name, URL and Google Analytics code if required. The comments near the top of the file will tell you where to do this. +3. Open your NGINX site configuration file found at `/etc/nginx/sites-enabled/default`. +4. For every existing root directory you want to add BetterListing to, add these lines in the correct location block: +``` +add_before_body /betterlisting/top.html; +add_after_body /betterlisting/bot.html; +audoindex_exact_size off; +autoindex_localtime on; +``` +The following example shows what your configuration might look like if you wanted to use BetterListing on yourdomain.com/downloads +``` +server { + server_name: yourdomain.com; + root /var/www/html; + + location /downloads { + add_before_body /betterlisting/top.html; + add_after_body /betterlisting/bot.html; + autoindex on; + autoindex_localtime on; + autoindex_exact_size off; + try files $uri $uri/ =404; + } +} +``` ## Acknowledgements: - [Apaxy](https://github.com/AdamWhitcroft/Apaxy) created by [AdamWhitcroft](http://adamwhitcroft.com) for the idea. If it was available for NGINX, I would have used that.