- همه ۹ عکس سایت بهصورت محلی (frontend/public/images) — بدون postimg/housedesign - حذف فونتهای خارجی (Google Fonts + fontcdn) — فونت سیستمی سریع - favicon واقعی + کش nginx برای webp/ico
29 lines
811 B
Nginx Configuration File
29 lines
811 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# مسیریابی SPA — همه مسیرها به index.html برمیگردند
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# پروکسی درخواستهای API به سرویس بکاند
|
|
location /api/ {
|
|
proxy_pass http://backend:8000;
|
|
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;
|
|
}
|
|
|
|
# کش استاتیک
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|svg|webp|ico|woff2?)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
}
|