41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
access_log /var/log/nginx/default.access.log;
|
|
access_log /var/log/nginx/default.error.log;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl default_server;
|
|
listen [::]:443 ssl default_server;
|
|
ssl_certificate /Certificates/test.crt;
|
|
ssl_certificate_key /Certificates/test.key;
|
|
access_log /var/log/nginx/default.433.access.log;
|
|
error_log /var/log/nginx/default.433.error.log;
|
|
location / {
|
|
root /Projects/default;
|
|
index index.html index.htm;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name ~^(anp|cdn|errorsmanager|wm(arkdown|d)|pythonmapper)\.local?$;
|
|
ssl_certificate /Certificates/test.crt;
|
|
ssl_certificate_key /Certificates/test.key;
|
|
access_log /var/log/nginx/default.433.access.log;
|
|
error_log /var/log/nginx/default.433.error.log;
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $proxy_add_x_forwarded_for;
|
|
proxy_pass http://socket_anp/;
|
|
}
|
|
}
|
|
|
|
upstream socket_anp {
|
|
server unix:/tmp/pointers/anp.sock;
|
|
} |