docker/nginx/nginx.conf
2023-12-10 13:19:03 +01:00

69 lines
1.5 KiB
Nginx Configuration File
Executable file

worker_processes auto;
events {
worker_connections 1024;
}
http {
server {
server_name wp.lan;
listen 80;
# return 301 https://$server_name$request_uri;
index index.php;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://wordpress";
}
}
# server {
# server_name wp.lan;
# listen 443 ssl;
# http2 on;
# ssl_certificate /etc/nginx/certs/lan.pem;
# ssl_certificate_key /etc/nginx/certs/lan-key.pem;
# index index.php;
# location / {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass "http://wordpress";
# }
# }
server {
server_name mz.lan;
listen 80;
return 301 https://$server_name$request_uri;
}
server {
server_name mz.lan;
listen 443 ssl;
http2 on;
ssl_certificate /etc/nginx/certs/lan.pem;
ssl_certificate_key /etc/nginx/certs/lan-key.pem;
client_max_body_size 16m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location / {
proxy_pass "https://mobilizon";
}
}
}