65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
upstream php_fpm {
|
|
server php-app:9000;
|
|
}
|
|
|
|
upstream n8n_backend {
|
|
server n8n:5678;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /var/www/html/public;
|
|
index index.php index.html;
|
|
|
|
# ===== 2) n8n - /n8n/ 경로로 분리 =====
|
|
# ^~ 를 붙여서, 이 location이 매치되면 정규식(~, ~*) location은 무시하게 만들기
|
|
location ^~ /n8n/ {
|
|
proxy_pass http://n8n_backend/;
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
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;
|
|
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
}
|
|
|
|
# ===== 1) WMS (Laravel) - 루트로 사용 =====
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
|
|
fastcgi_pass php_fpm;
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_read_timeout 600s;
|
|
fastcgi_send_timeout 600s;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
|
try_files $uri $uri/ @laravel;
|
|
expires 30d;
|
|
access_log off;
|
|
}
|
|
|
|
location @laravel {
|
|
fastcgi_pass php_fpm;
|
|
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
|
include fastcgi_params;
|
|
}
|
|
}
|
|
|