Summary Files Commits Branches @commit @diff @stats
path: root / syndamiadotcom
blob: 1520330fbec22927350f3c243d80a9a7818c8a7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# NGINX configuration file for the website
server {
    listen 80;
    root /var/www/syndamiadotcom/website;
    index index.html;
    server_name www.syndamia.com;

    # This removes .html extension from url (https://stackoverflow.com/a/38238001/12036073)
    location / {
        if ($request_uri ~ ^/(.*)\.html$) {
            return 302 /$1;
        }
        try_files $uri $uri.html $uri/ =404;
    }
}