Skip to content

Instantly share code, notes, and snippets.

@joaquimds
Last active February 27, 2019 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaquimds/3eddc3cdce88dca2eef53affb4b35d1a to your computer and use it in GitHub Desktop.
Save joaquimds/3eddc3cdce88dca2eef53affb4b35d1a to your computer and use it in GitHub Desktop.
server {
gzip on;
root /var/www/council-assets/build;
index index.html;
server_name council-sell-off.thebureauinvestigates.com; # managed by Certbot
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
access_log off;
}
location /api {
proxy_pass http://localhost:3000;
}
location / {
try_files $uri $uri/ /index.html;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/council-sell-off.thebureauinvestigates.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/council-sell-off.thebureauinvestigates.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = council-sell-off.thebureauinvestigates.com) {
return 301 https://$host$request_uri;
}
listen 80 ;
listen [::]:80 ;
server_name council-sell-off.thebureauinvestigates.com;
return 404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment