mirror of
https://github.com/KevinMidboe/nginx.git
synced 2025-10-29 17:50:26 +00:00
Cleanup : all sites share a common syntax
This commit is contained in:
29
sites-available/blog.conf
Normal file
29
sites-available/blog.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name blog.kevinmidboe.com;
|
||||
|
||||
add_header Upgrading Connection;
|
||||
return 302 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name blog.kevinmidboe.com;
|
||||
|
||||
location / {
|
||||
resolver 10.0.0.72;
|
||||
proxy_pass http://blog.schleppe:80;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/blog.kevinmidboe.com/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/blog.kevinmidboe.com/privkey.pem; # managed by Certbot
|
||||
}
|
||||
Reference in New Issue
Block a user