Skip to content

Instantly share code, notes, and snippets.

@vadviktor
Created May 17, 2016 15:34
Show Gist options
  • Save vadviktor/102b747b8547b6c24db540cc94aed822 to your computer and use it in GitHub Desktop.
Save vadviktor/102b747b8547b6c24db540cc94aed822 to your computer and use it in GitHub Desktop.
Nginx config for folder based static documentation reading, using a private domain resolved by local dns proxy (dnsmasq).
server {
listen 80 default_server;
server_name ~^(?<docroot>.+).lodocs$;
root /var/www/html/$docroot;
autoindex on;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
@vadviktor
Copy link
Author

example:

Directory: /var/www/html/rails-api-4.0.3
URL: http://rails-api-4.0.3.lodocs/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment