Files
crypto/backend/nginx.conf

30 lines
1.0 KiB
Nginx Configuration File
Raw Normal View History

2021-06-28 23:15:13 -04:00
server {
listen ${BACKEND_PORT} default_server;
root /app/backend/api/public;
access_log /var/log/nginx/backend.access.log;
error_log /var/log/nginx/backend.error.log;
index index.php index.html index.htm;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass backend:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
include fastcgi_params;
include /app/backend/proxy.conf;
}
}