mirror of
https://github.com/KevinMidboe/nginx.git
synced 2026-01-08 18:35:36 +00:00
Cleanup : all sites share a common syntax
This commit is contained in:
34
sites-available/wagovipps.conf
Normal file
34
sites-available/wagovipps.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name wagovipps.schleppe.cloud;
|
||||
|
||||
add_header Upgrading Connection;
|
||||
return 302 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name wagovipps.schleppe.cloud;
|
||||
|
||||
# TODO restrict to allow vipps servers
|
||||
location / {
|
||||
resolver 10.0.0.72;
|
||||
proxy_pass http://wagovipps.schleppe:80;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
|
||||
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Content-Type';
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/wagovipps.schleppe.cloud/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/wagovipps.schleppe.cloud/privkey.pem; # managed by Certbot
|
||||
}
|
||||
Reference in New Issue
Block a user