Skip to content

Instantly share code, notes, and snippets.

@pandanote-info
Last active January 31, 2020 15:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
nginxで80番ポートに来たアクセスを443番ポートに転送するための設定。panda大学習帳での表示用。
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