nginxで80番ポートに来たアクセスを443番ポートに転送するための設定。panda大学習帳での表示用。
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 { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
(前略) | |
# location定義の前あたりに挿入。 | |
# 実際の設定として使用する際には、ドル記号の前のバックスラッシュは不要。 | |
return 301 https://\$host\$request_uri; | |
(後略) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment