You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
87 lines
1.9 KiB
# Based on https://git.cloudron.io/cloudron/taiga-app/-/raw/master/nginx.conf
|
|
daemon off;
|
|
worker_processes auto;
|
|
pid /run/nginx/nginx.pid;
|
|
error_log stderr;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
http {
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
client_body_temp_path /run/nginx/client_body;
|
|
proxy_temp_path /run/nginx/proxy_temp;
|
|
fastcgi_temp_path /run/nginx/fastcgi_temp;
|
|
scgi_temp_path /run/nginx/scgi_temp;
|
|
uwsgi_temp_path /run/nginx/uwsgi_temp;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /dev/stdout;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
|
|
#odoo server
|
|
upstream odoo {
|
|
server 127.0.0.1:8069;
|
|
}
|
|
upstream odoo-lp {
|
|
server 127.0.0.1:8072;
|
|
}
|
|
|
|
server {
|
|
listen 8000;
|
|
|
|
server_name __REPLACE_WITH_CLOUDRON_APP_DOMAIN__;
|
|
proxy_read_timeout 720s;
|
|
proxy_connect_timeout 720s;
|
|
proxy_send_timeout 720s;
|
|
|
|
large_client_header_buffers 4 32k;
|
|
client_max_body_size 50M;
|
|
charset utf-8;
|
|
|
|
# Add Headers for odoo proxy mode
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Scheme $scheme;
|
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
# Redirect longpoll requests to odoo longpolling port
|
|
location /longpolling {
|
|
proxy_pass http://odoo-lp;
|
|
}
|
|
|
|
# Redirect requests to odoo backend server
|
|
location / {
|
|
proxy_redirect off;
|
|
proxy_pass http://odoo;
|
|
}
|
|
|
|
# common gzip
|
|
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
|
|
gzip on;
|
|
}
|
|
}
|