Browse Source

[wiki] Added nginx page

pull/1/head
Muthu Kumar 6 years ago
parent
commit
9917209e60
  1. 22
      doc/nginx.md

22
doc/nginx.md

@ -0,0 +1,22 @@
# nginx hacks and snippets
## Remove .html and rewrite urls
```text
server {
listen 80;
listen [::]:80;
root <root_dir>;
index index.html index.htm;
server_name <server_name>;
# rewrites .html to pretty urls
rewrite ^(/.+)\.html$ $scheme://$host$1 permanent;
location / {
index index.html index.htm;
try_files $uri.html $uri $uri/ @handler;
}
}
```
Loading…
Cancel
Save