config_testc/configs/nginx/templates/default

102 lines
2.9 KiB
Plaintext

server {
server_name teste.dot-dot.ru;
root /application/public;
location / {
proxy_pass http://nuxt:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
location /socket.io/auctionreload {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://php:${PHP_SOCKET_PORT}/;
}
location @rewriteapp {
rewrite ^(.*)$ /index.php/$1 last;
}
location /storybook {
alias /application/nuxt/storybook-static;
}
location /logout {
try_files $uri @rewriteapp;
}
location /help {
alias /application/help-platform/src/.vuepress/dist;
}
location /api {
rewrite ^(.*)$ /index.php/$1 last;
}
location /clockwork {
rewrite ^(.*)$ /index.php/$1 last;
}
location /__clockwork {
rewrite ^(.*)$ /index.php/$1 last;
}
location /pdf {
rewrite ^(.*)$ /index.php/$1 last;
}
location /1c {
rewrite ^(.*)$ /index.php/$1 last;
}
location /socket {
try_files $uri @rewriteapp;
}
location /admin {
try_files $uri @rewriteapp;
}
location /media {
try_files $uri @rewriteapp;
}
location /img {
alias /application/public/img;
}
location ~ ^/index\.php(/|$) {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization';
fastcgi_pass php:9001;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
error_log /var/log/nginx/dot_dot_error.log;
access_log /var/log/nginx/dot_dot_access.log;
}