mirror of
https://github.com/sergeyyarkov/astro-directus-example.git
synced 2026-10-11 02:08:57 +03:00
52 lines
1.0 KiB
Plaintext
52 lines
1.0 KiB
Plaintext
server_tokens off;
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name localhost;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
|
|
location ~* \.(css|js|png|jpe?g|wepb|ico|gif|svg)$ {
|
|
add_header Cache-Control "public";
|
|
access_log off;
|
|
expires 30d;
|
|
}
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
error_page 404 /404.html;
|
|
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
server_name cms.localhost;
|
|
|
|
location / {
|
|
proxy_pass http://directus:8055;
|
|
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 REMOTE-HOST $remote_addr;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_connect_timeout 30s;
|
|
proxy_read_timeout 86400s;
|
|
proxy_send_timeout 30s;
|
|
proxy_http_version 1.1;
|
|
|
|
add_header X-Cache $upstream_cache_status;
|
|
}
|
|
} |