reverse proxy ocsinventory-reports
server {
listen 80;
server_name ocs.blablabla.org;
return 301 https://ocs.blablabla.org$request_uri;
}
# https://ocs.blablabla.org
server {
listen 443 ssl;
server_name ocs.blablabla.org;
charset utf-8;
access_log /mnt/storage/www/ocs.blablabla.org/logs/access_nginx.log;
error_log /mnt/storage/www/ocs.blablabla.org/logs/error_nginx.log debug;
ssl_certificate /etc/ssl/bundle.crt;
# ssl_trusted_certificate /etc/nginx/ssl/root.ca;
ssl_certificate_key /etc/ssl/1234.key;
location / {
default_type text/html;
allow 0.0.0.0/24; # kharkiv office
allow 0.0.0.0; # kramatorsk office
deny all;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-REQUEST_URI $request_uri;
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_pass http://127.0.0.1:8085;
client_max_body_size 50m;
client_body_buffer_size 256k;
proxy_connect_timeout 120;
proxy_send_timeout 90;
proxy_read_timeout 180;
proxy_buffer_size 4k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# deny access to .hidden files
location ~ /\. {
return 403;
}
}