1# how to use this file?
2
3# run the following
4
5# cp nginx.conf /etc/nginx/sites-available/lil.io.conf
6# ln -s /etc/nginx/sites-available/lil.io.conf /etc/nginx/sites-enables/lil.io.conf
7# sudo service nginx reload
8
9# replace lil.io to whatever your domain is.
10
11# we want www.domain.com to redirect to domain.com
12# this is a url shortner after all.
13server {
14 listen 80;
15 server_name www.lil.io; # replace
16 return 301 https://lil.io$request_uri;
17}
18
19server {
20 listen 80;
21
22 server_name lil.io; # replace
23
24 location / {
25 proxy_pass http://localhost:3030; # replace
26 proxy_http_version 1.1;
27 proxy_set_header Upgrade $http_upgrade;
28 proxy_set_header Connection 'upgrade';
29 proxy_set_header Host $host;
30 proxy_cache_bypass $http_upgrade;
31 }
32}