52 строки
1.2 KiB
Nginx Configuration File
52 строки
1.2 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes 4;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 19000;
|
|
}
|
|
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
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;
|
|
#tcp_nopush on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
#gzip on;
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name localhost nginx;
|
|
|
|
ssl_certificate cert.pem;
|
|
ssl_certificate_key key.pem;
|
|
client_max_body_size 20M;
|
|
|
|
location ~ ^/api/v1/experiments/(?:[\w-]+/recipe/)?$ {
|
|
proxy_pass http://app:7001;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://app:7001;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header x-forwarded-user "dev@example.com";
|
|
}
|
|
}
|
|
}
|