Created
May 20, 2022 17:56
-
-
Save SiddheshNan/b2741c9429263804c146b482e79186cd 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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen *:80; | |
listen [::]:80; | |
listen *:443 ssl http2; | |
ssl_protocols TLSv1.3 TLSv1.2; | |
listen [::]:443 ssl http2; | |
ssl_certificate /var/www/clients/client0/web12/ssl/iot.aimtechs.co.in-le.crt; | |
ssl_certificate_key /var/www/clients/client0/web12/ssl/iot.aimtechs.co.in-le.key; | |
server_name iot.aimtechs.co.in ; | |
root /var/www/iot.aimtechs.co.in/web/; | |
disable_symlinks if_not_owner from=$document_root; | |
if ($scheme != "https") { | |
rewrite ^(?!/\.well-known/acme-challenge)/ https://$http_host$request_uri? permanent; | |
} | |
index index.html index.htm index.php index.cgi index.pl index.xhtml standard_index.html; | |
error_page 400 /error/400.html; | |
error_page 401 /error/401.html; | |
error_page 403 /error/403.html; | |
error_page 404 /error/404.html; | |
error_page 405 /error/405.html; | |
error_page 500 /error/500.html; | |
error_page 502 /error/502.html; | |
error_page 503 /error/503.html; | |
recursive_error_pages on; | |
location = /error/400.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/401.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/403.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/404.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/405.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/500.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/502.html { | |
internal; | |
auth_basic off; | |
} | |
location = /error/503.html { | |
internal; | |
auth_basic off; | |
} | |
error_log /var/log/httpd/iot.aimtechs.co.in/error.log; | |
access_log /var/log/httpd/iot.aimtechs.co.in/access.log combined; | |
location ~ /\. { | |
deny all; | |
} | |
location ^~ /.well-known/acme-challenge/ { | |
access_log off; | |
log_not_found off; | |
auth_basic off; | |
root /usr/local/interface/acme/; | |
autoindex off; | |
index index.html; | |
try_files $uri $uri/ =404; | |
} | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
expires max; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
} | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
location /stats/ { | |
index index.html index.php; | |
auth_basic "Members Only"; | |
auth_basic_user_file /var/www/clients/client0/web12/web//stats/.htpasswd_stats; | |
add_header Content-Security-Policy "default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:;"; | |
} | |
location ^~ /awstats-icon { | |
alias /usr/share/awstats/icon; | |
} | |
location ~ \.php$ { | |
try_files /a76c738cefab3ef6f13f923471c8c422.htm @php; | |
} | |
location @php { | |
deny all; | |
} | |
location / { | |
proxy_pass https://localhost:5551; | |
proxy_ssl_verify off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header Host $host; | |
proxy_buffering off; | |
proxy_cache off; | |
chunked_transfer_encoding off; | |
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_set_header X-Forwarded-Host $host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment