Created
August 19, 2018 04:31
-
-
Save wujcheng/fdef761d23f9879ff663a8b76382d755 to your computer and use it in GitHub Desktop.
GDGDocs反向代理的nginx配置文件。
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 | |
{ | |
listen 443 ssl; | |
listen 80; | |
server_name gdgdocs.org www.gdgdocs.org; | |
ssl_certificate /home/certs/www.gdgdocs.org_conbined.crt; | |
ssl_certificate_key /home/certs/www.gdgdocs.org_nopass.key; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
location / { | |
proxy_set_header Accept-Encoding ""; | |
sub_filter docs.google.com www.gdgdocs.org; #替换原域名 | |
sub_filter_once off; | |
proxy_pass https://docs.google.com/; | |
#proxy_set_header Host docs.google.com; | |
proxy_redirect https://docs.google.com/ /; | |
proxy_redirect http://www.google.com/url /url; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header Set-Cookie; | |
} | |
# location /spreadsheet/ { | |
# | |
# } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment