mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
58 lines
1.5 KiB
Nginx Configuration File
58 lines
1.5 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes auto;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
default_type application/octet-stream;
|
|
include /etc/nginx/mime.types;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
include /etc/nginx/mime.types;
|
|
|
|
set $backend_ip localhost;
|
|
set $domain_name localhost;
|
|
|
|
proxy_pass_header Content-Type;
|
|
proxy_set_header X-Real-IP $domain_name;
|
|
proxy_set_header X-Forwarded-For $domain_name;
|
|
proxy_set_header Host $domain_name;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_connect_timeout 1;
|
|
proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404;
|
|
proxy_intercept_errors on;
|
|
|
|
location / {
|
|
proxy_pass http://$backend_ip:49152;
|
|
}
|
|
|
|
location ~ ^/(maxhold|api|stash)/(.*) {
|
|
proxy_pass http://$backend_ip:3000/$1/$2;
|
|
}
|
|
|
|
error_page 501 502 503 504 =200 /error.html;
|
|
location = /error.html {
|
|
root /usr/local/apache2/htdocs;
|
|
}
|
|
|
|
}
|
|
}
|