From 75f35b81833829224d529933288d8fbd5023bb52 Mon Sep 17 00:00:00 2001
From: parsa aghaei
Date: Mon, 13 Jul 2026 11:38:07 +0330
Subject: [PATCH] chore: update nginx config for deployment
---
nginx.conf | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/nginx.conf b/nginx.conf
index 4181926d..a327a1c0 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -1,25 +1,19 @@
server {
- listen 8080;
- server_name canina.parsaaghayi.ir;
- root /usr/share/nginx/html;
+ listen 8080 default_server;
+ server_name _;
+ root /app;
index index.html;
# Security Headers
server_tokens off;
- add_header X-Frame-Options "SAMEORIGIN" always;
+ add_header X-Frame-ों "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' 'unsafe-eval' https://images.unsplash.com https://canina.de;" always;
- # Support for SPA routing
location / {
- try_files $uri $uri/ /index.html;
- }
-
- # Proxy API requests to backend
- location /api {
- proxy_pass http://backend:3000;
+ proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@@ -30,8 +24,8 @@ server {
server {
listen 8080;
- server_name admin.canina.parsaaghayi.ir;
- root /usr/share/nginx/html/admin;
+ server_name admincanina.parsaaghayi.ir;
+ root /app/admin_static;
index index.html;
# Security Headers
@@ -42,12 +36,10 @@ server {
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' 'unsafe-eval' https://images.unsplash.com https://canina.de;" always;
- # Support for SPA routing
location / {
try_files $uri $uri/ /index.html;
}
- # Proxy API requests to backend
location /api {
proxy_pass http://backend:3000;
proxy_http_version 1.1;