index index.html index.htm index.nginx-debian.html;
server_name 도메인.com; # managed by Certbot
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://localhost:백단포트; #whatever port your app runs on
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/도메인.com/fullchain.pem; # managed by
Certbot
ssl_certificate_key /etc/letsencrypt/live/도메인.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 = 도메인.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 ;
listen [::]:80 ;
server_name 도메인.com;
return 404; # managed by Certbot
}
'linux > etc' 카테고리의 다른 글
리눅스 기타 등등 (0) | 2023.09.21 |
---|---|
PXE dhcpd패키지 다른대역대 사용 (0) | 2023.09.19 |
nginx // user agent 제어 (0) | 2023.02.16 |
ㅁㅈㄴ (0) | 2022.12.15 |
단축키 (0) | 2022.11.21 |