Last active
April 3, 2019 11:51
-
-
Save antonybudianto/82c1ec735c94d95b4c78f85dafffa43b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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