Skip to main content
1 / 2
user avatar
user avatar

ドメインでサイトが開けません。

設置した掲示板
環境はubuntuです。上の掲示板を設置して、ドメインのほうも設置しました。
(仮にIPは123.45.6.789として、上の掲示板はポートは5000です。)
設置したドメインにアクセスしたら、"Apache2 Ubuntu Default Page"と表示されました。そのあとにapache2が動いていると思ったので、/etc/apache2/sites-enabled/000-default.conf の所に
ProxyPass / http://123.45.6.789:5000
ProxyPassReverse / http://123.45.6.789:5000
と追記しました。
そしたら、サイトにアクセスできました。しかし、ここから違うところにアクセスしたら以下のように表示されました。どうすれば直りますか?

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /sample/.
Reason: DNS lookup failure for: 123.45.6.789:5000sample
Apache/2.4.18 (Ubuntu) Server at domain Port 443

あと、このサイトをEncryptを使って暗号化しました。
関係のあるファイルを一応載せておきます
/etc/apache2/ports.conf

If you just change the port or add more ports here, you will likely also

# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80

Listen 443


Listen 443

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port t$
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ProxyPass / http://IP:5000/
    ProxyPassReverse / http://IP:5000/

ProxyPassReverseCookieDomain IP:5000 domain
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular

/etc/apache2/sites-enabled/000-default-le-ssl.conf

<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port t$
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ProxyPass / http://domain:5000
    ProxyPassReverse / http://domain:5000
    ProxyPassReverseCookieDomain IP:5000 domain

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
user29735