snipplets.dev/code/nginx/redirect.conf

25 lines
326 B
Plaintext
Raw Normal View History

2021-11-18 02:23:08 +03:00
server {
listen 80;
server_name SITE_URL;
2021-11-18 02:33:12 +03:00
location /robots.txt {
root FOLDER;
}
location / {
return 301 https://$host$request_uri;
}
2021-11-18 02:23:08 +03:00
}
server {
listen 443 ssl;
server_name SITE_URL;
ssl_certificate PATH_TO_PEM;
ssl_certificate_key PATH_TO_PEM;
root FOLDER;
}