nginx-config/nginx.conf~

97 lines
2.5 KiB
Nginx Configuration File
Raw Normal View History

2020-12-14 23:34:00 +03:00
# xworker_processes 1;
events {
worker_connections 1024;
}
http {
resolver 127.0.0.1;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 10;
server {
listen 81;
server_name localhost;
root /home/ijl/ijl/apps/lavr/master;
location / {
index index.html;
}
}
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 {
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 {
listen 3002;
server_name localhost;
set $udsRoot "/home/ijl/ijl/apps";
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
location /static/ {
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';
alias "$udsRoot/";
# alias "$udsRoot/bootstrap/dist/index.js";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}