mzya
(mzya)
1
Discourseを他のNginxサイトと一緒にインストールする方法を検討してきましたが、セットアップ時に以下のメッセージが表示され続けています:
WARNING: Port 443 of computer does not appear to be accessible using hostname: lush.gg.
WARNING: Connection to http://<domain> (port 80) also fails.
CloudflareがIPアドレスのプロキシ処理を行っていないことは確認済みです。また、サーバーに割り当てられたセカンダリIPアドレスを使用しており、最初のIPアドレスにはすでにNginxのWebサイトが稼働しています。
更新した app.yml
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
- "templates/web.socketed.template.yml"
## Lets Encrypt (https) を追加したい場合は、以下の2行のコメントを外してください
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"
## このコンテナが公開するTCP/IPポートを指定します
## DiscourseをApacheやNginxなどの他のWebサーバーとポートを共有したい場合は、
## https://meta.discourse.org/t/17247 を参照してください
#expose:
#- "25654:80" # http
#- "443:443" # https
更新した nginx 設定
server {
listen <ip address>:80; listen [::]:80;
server_name <domain>; # <-- ここを変更してください
return 301 https://$host$request_uri;
}
server {
listen <ip address>:443 ssl http2; listen [::]:443 ssl http2;
server_name <domain>; # <-- ここを変更してください
ssl_certificate /data/web/discourse/shared/standalone/ssl/fullchain.pem;
ssl_certificate_key /data/web/discourse/shared/standalone/ssl/privkey.pem;
ssl_dhparam /data/web/discourse/shared/standalone/ssl/dhparams.pem;
ssl_session_tickets off;
# 投稿から削除済み: ssl_ciphers ...
http2_idle_timeout 5m; # デフォルトの3分から5分に増量
client_max_body_size 0;
location / {
proxy_pass http://unix:/data/web/discourse/shared/standalone/nginx.http.sock:;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
}
}
何が間違っているのでしょうか?
お使いのサーバーのポート 80/443 が別の nginx サーバーによって占有されているため、Discourse は接続を確立できません。
同じサーバー上で Discourse と他の Web サイトを併用したい場合は、以下のチュートリアルをご覧ください:
「いいね!」 1
mzya
(mzya)
3
はい、実は最初にこれを試してみたのですが、もう一度試して結果をお知らせします!
mzya
(mzya)
4
残念ながら同じ結果です!
nginx 設定
server {
listen 80; listen [::]:80;
server_name lush.gg; # <-- これを変更してください
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2; listen [::]:443 ssl http2;
server_name lush.gg; # <-- これを変更してください
ssl_certificate /etc/letsencrypt/live/lush.gg/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lush.gg/privkey.pem;
# ssl_dhparam /var/discourse/shared/standalone/ssl/dhparams.pem;
ssl_session_tickets off;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
http2_idle_timeout 5m; # デフォルトの 3m から 5m に変更
client_max_body_size 0;
location / {
proxy_pass http://unix:/data/web/lush-discourse/shared/standalone/nginx.http.sock:;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
}
}
app.yml
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
- "templates/web.socketed.template.yml"
## Lets Encrypt (https) を追加したい場合は、以下の 2 行のコメントアウトを解除してください
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"
## このコンテナが公開する TCP/IP ポートはどれですか?
## Discourse を Apache や nginx などの他の Web サーバーとポートを共有したい場合は、
## https://meta.discourse.org/t/17247 を参照してください
#expose:
#- "25654:80" # http
#- "443:443" # https
mzya
(mzya)
5
わかりました!ポイントは DOCKER_USE_HOSTNAME: true を有効にすることでしたね。
system
(system)
クローズされました:
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.