mirror of
https://github.com/KevinMidboe/nginx.git
synced 2025-12-31 22:46:22 +00:00
Cleanup : all sites share a common syntax
This commit is contained in:
@@ -1,27 +1,40 @@
|
||||
upstream backend {
|
||||
# enable sticky session based on IP
|
||||
ip_hash;
|
||||
|
||||
server 10.0.0.150;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name hive.schleppe.cloud;
|
||||
|
||||
add_header Upgrading Connection;
|
||||
return 302 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name rosendal.buzz;
|
||||
|
||||
gzip on;
|
||||
gzip_types application/json;
|
||||
gzip_min_length 1000;
|
||||
server_name hive.schleppe.cloud;
|
||||
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
add_header 'Access-Control-Allow-Origin' 'rosendal.buzz';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Content-Type';
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:30040;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host hive.kazan.schleppe;
|
||||
|
||||
resolver ns1.schleppe;
|
||||
proxy_pass http://hive.kazan.schleppe;
|
||||
# proxy_pass http://backend;
|
||||
}
|
||||
ssl_certificate /etc/letsencrypt/live/vinlottis.no-0001/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/vinlottis.no-0001/privkey.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/hive.schleppe.cloud/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/hive.schleppe.cloud/privkey.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user