Created
April 4, 2016 16:54
-
-
Save eneldoserrata/ef5224b62bc27f799ad8449c1bfe9322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443; | |
server_name fhisa.tabla.si; | |
access_log /var/log/nginx/fhisa.access.log; | |
error_log /var/log/nginx/fhisa.error.log; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/fhisa.crt; | |
ssl_certificate_key /etc/nginx/ssl/fhisa.key; | |
keepalive_timeout 90; | |
ssl_ciphers HIGH:!ADH:!MD5; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_prefer_server_ciphers on; | |
proxy_buffers 16 64k; | |
proxy_buffer_size 128k; | |
location /longpolling { | |
proxy_pass http://odoo-lp; | |
} | |
location / { | |
proxy_pass http://odoo; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect off; | |
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 https; | |
} | |
location ~* /web/static/ { | |
proxy_cache_valid 100 30m; | |
proxy_buffering on; | |
expires 864000; | |
proxy_pass http://odoo; | |
} | |
} | |
server { | |
listen 80; | |
server_name fhisa.tabla.si; | |
add_header Strict-Transport-Security max-age=2592000; | |
rewrite ^/.*$ https://$host$request_uri? permanent; | |
} | |
And this is my nginx.conf file: | |
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
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; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
gzip on; | |
gzip_disable "msie6"; | |
include /etc/nginx/conf.d/*.conf; | |
upstream odoo { | |
server 127.0.0.1:8069; | |
} | |
upstream odoo-lp { | |
server 127.0.0.1:8072; | |
} | |
include /etc/nginx/sites-enabled/*; | |
client_max_body_size 20M; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment