Skip to content

Instantly share code, notes, and snippets.

@antonybudianto
Last active April 3, 2019 11:51
Show Gist options
  • Save antonybudianto/82c1ec735c94d95b4c78f85dafffa43b to your computer and use it in GitHub Desktop.
Save antonybudianto/82c1ec735c94d95b4c78f85dafffa43b to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
server_name hello.antonybudianto.com;
# root /usr/share/nginx/html;
root /home/ec2-user/web/hello/build;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
}
server {
listen 80;
listen [::]:80;
server_name gitfun.antonybudianto.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name gitfun.antonybudianto.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/gitfun.antonybudianto.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/gitfun.antonybudianto.com/privkey.pem;
root /home/ec2-user/web/gitfun-web/build;
location / {
try_files $uri $uri/ /index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment