73 lines
2.2 KiB
Nginx Configuration File
73 lines
2.2 KiB
Nginx Configuration File
|
events {}
|
||
|
|
||
|
http {
|
||
|
server {
|
||
|
server_name localhost;
|
||
|
root /var/www/public;
|
||
|
index index.php index.html index.htm;
|
||
|
listen 80;
|
||
|
|
||
|
include /etc/nginx/mime.types;
|
||
|
default_type application/octet-stream;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://node:5173;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-NginX-Proxy true;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
|
||
|
proxy_redirect off;
|
||
|
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
}
|
||
|
|
||
|
location /api {
|
||
|
try_files $uri $uri/ /index.php?$query_string;
|
||
|
}
|
||
|
|
||
|
# PHP-FPM Configuration Nginx
|
||
|
location ~ \.php$ {
|
||
|
try_files $uri = 404;
|
||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
fastcgi_pass php:9000;
|
||
|
fastcgi_index index.php;
|
||
|
include fastcgi_params;
|
||
|
fastcgi_param REQUEST_URI $request_uri;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||
|
}
|
||
|
|
||
|
# server {
|
||
|
# server_name localhost;
|
||
|
|
||
|
# listen 443 ssl;
|
||
|
# fastcgi_param HTTPS on;
|
||
|
|
||
|
# ssl_certificate /etc/ssl/server.pem;
|
||
|
# ssl_certificate_key /etc/ssl/server.key;
|
||
|
# ssl_protocols TLSv1.3;
|
||
|
|
||
|
# index index.php index.html;
|
||
|
# error_log /var/log/nginx/error.log;
|
||
|
# access_log /var/log/nginx/access.log;
|
||
|
# root /var/www/html/public;
|
||
|
|
||
|
# location ~ \.php$ {
|
||
|
# try_files $uri =404;
|
||
|
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
# fastcgi_pass php:9000;
|
||
|
# fastcgi_index index.php;
|
||
|
# include fastcgi_params;
|
||
|
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
# fastcgi_param PATH_INFO $fastcgi_path_info;
|
||
|
# }
|
||
|
|
||
|
error_log /var/log/nginx/error.log;
|
||
|
access_log /var/log/nginx/access.log;
|
||
|
}
|
||
|
}
|