Last active
April 17, 2020 02:05
-
-
Save murachi1208/c0cf0cc988a1cd347e7a to your computer and use it in GitHub Desktop.
Nginx でリバースプロキシサーバーつかってみる。Apache -> Nginx ref: http://qiita.com/murachi1208/items/d04797b0b61e69018938
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 80; | |
server_name バーチャルホスト名; ← 外部から引けること | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_max_temp_file_size 0; | |
location / { | |
proxy_pass http://192.168.11.88; | |
} | |
} |
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
http { | |
server_tokens off; | |
... |
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
LogFormat "%h ・・・・ | |
↓ | |
LogFormat "%a ・・・・ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment