Last active
February 16, 2021 09:20
-
-
Save majedbojan/6cf8def3bca4631d7e07a5bcc24f584b 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
# Create a proxy server that forwards requests to thirdparty | |
# 1) Create a file in `/etc/nginx/sites-available` and name it any name | |
# 2) Copy the script replace `server_name` with your server domain and `proxy_pass` with third party domain. | |
server { | |
listen 80; | |
server_name YourDomain.com; | |
location / { | |
proxy_pass https://ThirdPartyDomain.com; | |
#proxy_ssl_certificate /etc/nginx/ssl; | |
#proxy_ssl_certificate_key /etc/nginx/ssl; | |
#proxy_ssl_trusted_certificate /etc/nginx/ssl; | |
#proxy_ssl_verify on; | |
#proxy_ssl_verify_depth 2; | |
proxy_read_timeout 300s; | |
proxy_connect_timeout 75s; | |
} | |
} | |
# Refferences https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment