-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
30 lines (26 loc) · 714 Bytes
/
nginx.conf
File metadata and controls
30 lines (26 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
server {
listen 80;
server_name localhost;
root /var/www/html/public;
index index.php index.html;
# Vue SPA static assets (built by frontend service)
location /static/ {
alias /var/www/html/public/static/;
try_files $uri $uri/ =404;
expires 30d;
add_header Cache-Control "public, immutable";
}
# API routes → PHP-FPM
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}