質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Apache

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

1回答

1551閲覧

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

退会済みユーザー

退会済みユーザー

総合スコア0

Apache

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2018/09/04 11:30

編集2022/01/12 10:55

設置した掲示板
環境は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

どうしたら表示されますか?
一応、/etc/apache2/ports.conf の中身をかいときます

ports.conf

1# If you just change the port or add more ports here, you will likely also 2# have to change the VirtualHost statement in 3# /etc/apache2/sites-enabled/000-default.conf 4 5Listen 80 6 7<IfModule ssl_module> 8 Listen 443 9</IfModule> 10 11<IfModule mod_gnutls.c> 12 Listen 443 13</IfModule> 14 15# vim: syntax=apache ts=4 sw=4 sts=4 sr noet 16

/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/ # 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内は

000

1<IfModule mod_ssl.c> 2<VirtualHost *:443> 3 # The ServerName directive sets the request scheme, hostname and port t$ 4 # the server uses to identify itself. This is used when creating 5 # redirection URLs. In the context of virtual hosts, the ServerName 6 # specifies what hostname must appear in the request's Host: header to 7 # match this virtual host. For the default virtual host (this file) this 8 # value is not decisive as it is used as a last resort host regardless. 9 # However, you must set it for any further virtual host explicitly. 10 #ServerName www.example.com 11 12 ServerAdmin webmaster@localhost 13 DocumentRoot /var/www/html 14 ProxyPass / http://domain:5000 15 ProxyPassReverse / http://domain:5000 16 ProxyPassReverseCookieDomain IP:5000 domain 17 18 # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 19 # error, crit, alert, emerg. 20

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

CHERRY

2018/09/04 12:10

https://teratail.com/questions/144554 の続きですね。 「ここから違うところにアクセスしたら以下のように表示されました。」というのは、どこにアクセスしたのでしょうか?
CHERRY

2018/09/04 12:18 編集

エラーメッセージに 443がありますが、Proxy の設定は、SSL の中に書いたのでしょうか? 関連する Apache の設定項目を全て提示してください。
退会済みユーザー

退会済みユーザー

2018/09/04 13:46 編集

homeから仮にcontact.htmlにアクセスしました。(home.htmlからどこにアクセスしても同じなんですけど)Proxyの設定はSSL内ではなく、/etc/apache2/sites-enabled/000-default.confに追加しました。 あと、このサイトをEncryptを使って暗号化して、/etc/apache2/sites-enabled/000-default-le-ssl.conf内に ProxyPass / http://domain:5000 ProxyPassReverse / http://domain:5000 と追記しておきました。
guest

回答1

0

こんな漢字で、

ProxyPass / http://123.45.6.789:5000/ ProxyPassReverse / http://123.45.6.789:5000/

投稿2018/09/04 12:55

hichon

総合スコア5737

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2018/09/04 13:36

だめです。さっきと同じです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問