Created
September 18, 2024 18:46
-
-
Save PeterHindes/4471d8c7ebf782cbfff609c6c965dec2 to your computer and use it in GitHub Desktop.
Nginx Reverse Proxy a public ssl domain
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
events{} | |
http { | |
# serve synbiohub on port 7777 | |
server { | |
listen 7777; | |
server_name localhost; | |
location / { | |
# Proxy to the new target URL without verifying SSL | |
proxy_pass https://example.com/; # Change to the target URL | |
# Set Host header to the original requested host | |
proxy_set_header Host example.com; # Forward the original Host header | |
# Forward common headers to make it look like a direct request | |
proxy_set_header User-Agent $http_user_agent; # Forward User-Agent | |
proxy_set_header Accept $http_accept; # Forward Accept | |
proxy_set_header Accept-Language $http_accept_language; # Forward Accept-Language | |
proxy_set_header Accept-Encoding $http_accept_encoding; # Forward Accept-Encoding | |
# Disable SSL verification | |
proxy_ssl_verify off; # Do not verify the SSL certificate of the backend | |
proxy_ssl_protocols TLSv1.2 TLSv1.3; # Ensure proper protocols | |
proxy_ssl_ciphers 'HIGH:!aNULL:!MD5'; # Ensure strong ciphers | |
# Keep address for virtual hosts | |
proxy_ssl_server_name on; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment