Nginx – Virtualmin – Odoo – configuration SSL
5 March, 2021 by
Nginx – Virtualmin – Odoo – configuration SSL
Administrator
| No comments yet

server {
listen 159.253.1.165:80 default;
server_name _;
access_log /var/log/nginx/default.access.log;
error_log /var/log/nginx/default.error.log;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

location = / {
rewrite ^ http://boostthis.nl permanent;
}

location / {
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;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_cache microcache;
# fastcgi_cache_key $scheme$host$request_uri$request_method;
# fastcgi_cache_valid 200 301 302 30s;
# fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
include fastcgi_params;

}
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
rewrite_log on;
gzip on;
root /home/boostthis/public_html/;
}

location ~ \.(aspx|php|jsp|cgi)$ {
return 410;
}

gzip on;
}

Sign in to leave a comment