nginx-config/nginx.conf

133 lines
4.0 KiB
Nginx Configuration File
Raw Normal View History

2020-12-14 23:34:00 +03:00
# xworker_processes 1;
2020-02-08 13:39:34 +03:00
events {
worker_connections 1024;
}
http {
resolver 127.0.0.1;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 10;
2020-12-14 23:34:00 +03:00
upstream backend {
server 89.223.91.151:8033;
}
2021-01-19 18:57:38 +03:00
upstream multystub {
server 89.223.91.151:8043;
}
2020-12-14 23:34:00 +03:00
2021-01-19 18:57:38 +03:00
# server {
# listen 81;
# server_name localhost;
# root /home/ijl/ijl/apps/lavr/master;
#
# location / {
# index index.html;
# }
# }
2020-12-14 23:34:00 +03:00
server {
listen 82;
index index.php index.html index.htm index.nginx-debian.html;
server_name localhost;
root /home/ijl/ijl/apps/stc28;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
server {
2021-01-19 18:57:38 +03:00
listen 8080;
2020-12-14 23:34:00 +03:00
# index index.php index.html index.htm index.nginx-debian.html;
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
2021-01-19 18:57:38 +03:00
proxy_pass http://89.223.91.151:8079/;
2020-12-14 23:34:00 +03:00
}
location /api {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
proxy_pass http://backend;
}
2021-01-19 18:57:38 +03:00
location /multystub/ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
proxy_pass http://multystub/;
}
2020-12-14 23:34:00 +03:00
}
server {
listen 83;
root /home/ijl/;
index index.php index.html index.htm index.nginx-debian.html;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
server {
2020-02-08 13:39:34 +03:00
listen 3002;
server_name localhost;
2020-12-14 23:34:00 +03:00
set $udsRoot "/home/ijl/ijl/apps";
2020-02-08 13:39:34 +03:00
root $udsRoot;
# index.html bootstrap
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
index index.html index.htm;
alias "$udsRoot/uds-middle/dist/";
}
# index.html bootstrap
2020-03-10 22:48:21 +03:00
location /static/ {
2020-02-08 13:39:34 +03:00
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
2020-03-10 22:48:21 +03:00
alias "$udsRoot/";
# alias "$udsRoot/bootstrap/dist/index.js";
2020-02-08 13:39:34 +03:00
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}