Document staging HTTPS on wixur.ir (Windows nginx + Let's Encrypt).
Mobinnet holds public port 80, so staging is served on 443. Examples and the host nginx template now match FRONTEND_URL=https://wixur.ir. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
78
infrastructure/nginx/windows-edge-http.conf
Normal file
78
infrastructure/nginx/windows-edge-http.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
# Windows host nginx.conf — paste over
|
||||
# C:\tools\nginx-1.29.5\conf\nginx.conf
|
||||
#
|
||||
# :80 — LAN / 127.0.0.1 only (Mobinnet keeps public :80 for the modem)
|
||||
# :443 — public https://wixur.ir (router must forward 443 → this PC)
|
||||
#
|
||||
# Put Let's Encrypt PEMs in conf\ssl\ (win-acme --pemfilesname wixur):
|
||||
# ssl\wixur-chain.pem
|
||||
# ssl\wixur-key.pem
|
||||
#
|
||||
# After save: nginx -t then restart nginx
|
||||
# curl.exe https://wixur.ir/health → healthy
|
||||
# (curl to 127.0.0.1:443 fails name-check; cert is for wixur.ir)
|
||||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 50M;
|
||||
|
||||
# Shared proxy to Docker staging
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name wixur.ir www.wixur.ir localhost 127.0.0.1;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:18088;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
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;
|
||||
proxy_read_timeout 300;
|
||||
proxy_connect_timeout 300;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name wixur.ir www.wixur.ir localhost 127.0.0.1;
|
||||
|
||||
ssl_certificate ssl/wixur-chain.pem;
|
||||
ssl_certificate_key ssl/wixur-key.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:18088;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
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;
|
||||
proxy_read_timeout 300;
|
||||
proxy_connect_timeout 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user