From b644057042b1957c3f5be2acbc08e90b666d0d08 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:09:51 +0330 Subject: [PATCH] Import deployment configuration: deploy/nginx/cp.asabbagh.com Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- deploy/nginx/cp.asabbagh.com | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 deploy/nginx/cp.asabbagh.com diff --git a/deploy/nginx/cp.asabbagh.com b/deploy/nginx/cp.asabbagh.com new file mode 100644 index 0000000..b88d796 --- /dev/null +++ b/deploy/nginx/cp.asabbagh.com @@ -0,0 +1,75 @@ +server { + listen 80; + listen [::]:80; + server_name cp.asabbagh.com; + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + try_files $uri =404; + } + + location / { + return 301 https://cp.asabbagh.com$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + server_name cp.asabbagh.com; + + ssl_certificate /etc/letsencrypt/live/cp.asabbagh.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/cp.asabbagh.com/privkey.pem; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + + client_max_body_size 100m; + + location /phpmyadmin/ { + proxy_pass http://127.0.0.1:8089/; + proxy_http_version 1.1; + proxy_set_header Host $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; + proxy_set_header X-Forwarded-Prefix /phpmyadmin; + proxy_read_timeout 120s; + proxy_send_timeout 120s; + } + + location /api/ { + proxy_pass http://127.0.0.1:3020/api/; + proxy_http_version 1.1; + proxy_set_header Host $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; + proxy_read_timeout 120s; + proxy_send_timeout 120s; + } + + location /health { + proxy_pass http://127.0.0.1:3020/health; + proxy_http_version 1.1; + proxy_set_header Host $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; + proxy_read_timeout 30s; + proxy_send_timeout 30s; + } + + location / { + proxy_pass http://127.0.0.1:3110; + proxy_http_version 1.1; + proxy_set_header Host $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; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_read_timeout 120s; + proxy_send_timeout 120s; + } +}