50 lines
1.4 KiB
Nginx Configuration File
50 lines
1.4 KiB
Nginx Configuration File
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
access_log /proc/1/fd/1;
|
|
error_log /proc/1/fd/2;
|
|
|
|
server {
|
|
listen 9080;
|
|
server_name localhost;
|
|
|
|
client_max_body_size 10M;
|
|
|
|
# Headers de base
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# Proxy simple vers CookCLI
|
|
location / {
|
|
proxy_pass http://127.0.0.1:9081;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_buffering off;
|
|
|
|
|
|
sub_filter_once off;
|
|
sub_filter_types text/html text/css application/javascript;
|
|
sub_filter 'href="/' 'href="/app/19e08496_cookcli/';
|
|
sub_filter 'src="/' 'src="/app/19e08496_cookcli/';
|
|
sub_filter 'action="/' 'action="/app/19e08496_cookcli/';
|
|
|
|
# Gérer les redirections
|
|
proxy_redirect http://127.0.0.1:9081/ $scheme://$host/app/19e08496_cookcli/;
|
|
proxy_redirect http://127.0.0.1:9081 $scheme://$host/app/19e08496_cookcli;
|
|
}
|
|
}
|
|
}
|
|
|