mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
29 lines
916 B
Plaintext
29 lines
916 B
Plaintext
server {
|
|
listen <LISTEN_IP>;
|
|
server_name <DOMAIN_NAME> www.<DOMAIN_NAME>;
|
|
modsecurity on;
|
|
modsecurity_rules_file /usr/local/nginx/conf/modsecurity.conf;
|
|
include snippets/error_pages.conf;
|
|
access_log /var/log/nginx/domlogs/<DOMAIN_NAME>.log;
|
|
include /etc/openpanel/openpanel/core/users/<USERNAME>/domains/<DOMAIN_NAME>-block_ips.conf;
|
|
|
|
# container
|
|
location / {
|
|
if ($scheme = "https") {
|
|
proxy_pass https://<IP>;
|
|
}
|
|
if ($scheme = "http") {
|
|
proxy_pass http://<IP>;
|
|
}
|
|
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 $scheme;
|
|
proxy_pass_header Server;
|
|
proxy_hide_header Server;
|
|
}
|
|
|
|
# openpanel
|
|
include /etc/openpanel/nginx/vhosts/openpanel_proxy.conf;
|
|
}
|