|
|
|
@ -1,6 +1,10 @@ |
|
|
|
server { |
|
|
|
listen 80; |
|
|
|
<<<<<<< HEAD |
|
|
|
# listen 443 ssl; |
|
|
|
======= |
|
|
|
listen 443 ssl; |
|
|
|
>>>>>>> a1b3ddf (Add Nginx configuration files for dovoodi and imamjavad services) |
|
|
|
server_name imamjavad.nwhco.ir imamjavad.newhorizonco.uk; |
|
|
|
# ssl_certificate /etc/nginx/certs/nwhco.pem; |
|
|
|
# ssl_certificate_key /etc/nginx/certs/nwhco.key; |
|
|
|
@ -81,7 +85,10 @@ server { |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
# 🔥 CRITICAL: Forward Authorization header for Token authentication |
|
|
|
======= |
|
|
|
>>>>>>> a1b3ddf (Add Nginx configuration files for dovoodi and imamjavad services) |
|
|
|
proxy_set_header Authorization $http_authorization; |
|
|
|
proxy_pass_header Authorization; |
|
|
|
|
|
|
|
@ -120,12 +127,32 @@ server { |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
} |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
location /static/ { |
|
|
|
alias /home/app/web/imam_javad_static/static/; |
|
|
|
} |
|
|
|
|
|
|
|
location /media/ { |
|
|
|
alias /home/app/web/imam_javad_static/media/; |
|
|
|
======= |
|
|
|
|
|
|
|
location /static/ { |
|
|
|
alias /home/app/web/imam_javad_staticfiles/; |
|
|
|
expires 30d; |
|
|
|
add_header Cache-Control "public, immutable"; |
|
|
|
} |
|
|
|
|
|
|
|
location /media/{ |
|
|
|
alias /home/app/web/imam_javad_mediafiles/; |
|
|
|
|
|
|
|
expires 30d; |
|
|
|
add_header Cache-Control "public, immutable"; |
|
|
|
|
|
|
|
# Enable CORS for media files |
|
|
|
add_header Access-Control-Allow-Origin *; |
|
|
|
add_header Access-Control-Allow-Methods "GET, OPTIONS"; |
|
|
|
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"; |
|
|
|
>>>>>>> a1b3ddf (Add Nginx configuration files for dovoodi and imamjavad services) |
|
|
|
} |
|
|
|
|
|
|
|
# ========== Next.js Frontend ========== |
|
|
|
@ -140,7 +167,10 @@ server { |
|
|
|
add_header Cache-Control "public, immutable"; |
|
|
|
} |
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
# ⚠️ این باید آخرین location باشد (fallback) |
|
|
|
======= |
|
|
|
>>>>>>> a1b3ddf (Add Nginx configuration files for dovoodi and imamjavad services) |
|
|
|
location / { |
|
|
|
proxy_pass http://88.99.212.243:7226; |
|
|
|
client_max_body_size 1200M; |
|
|
|
|