Created
April 28, 2024 18:02
-
-
Save depuits/294253729379864d5e18527fff7c4868 to your computer and use it in GitHub Desktop.
nginx.conf for isp agent dvr revers proxy
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 { | |
server_name ispy.domain.com; | |
listen 443 ssl http2; | |
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; | |
ssl_certificate /etc/nginx/certs/fullchain.pem; | |
ssl_certificate_key /etc/nginx/certs/privkey.pem; | |
include /etc/nginx/certs/options-ssl-nginx.conf; | |
ssl_dhparam /etc/nginx/certs/ssl-dhparams.pem; | |
location / { | |
proxy_pass http://192.168.0.50:8090; | |
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-Host $server_name; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade_keepalive; | |
} | |
} | |
stream { | |
server { | |
listen 3478; | |
listen 3478 udp; | |
listen 50000-50010; | |
listen 50000-50010 udp; | |
proxy_pass 192.168.0.50:$server_port; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment