0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ApacheとGlassFishの連携でエラーが発生

Last updated at Posted at 2023-05-18

現象

テスト環境構築で、ApacheにDigest認証を設定し、かつバックエンドのポート28080でListenしているGlassFishに接続するようリバースプロキシの設定を行ったが、接続してみたところエラーが返ってきた。(28080でListenさせている理由は不明)また、直接localhost:28080への接続は問題なかった。

curl --anyauth --user xxx:xxxxxx http://localhost

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>

プロキシの設定はインストール時に作成される、00-proxy.confに以下追加したのみ

ProxyPass / http://localhost:28080
ProxyPassRevers http://localhost:28080

対応

よく分からなかったのでSelinuxの設定を確認し、一旦無効にしてみたところ疎通が確認できた。

getenforce 
Enforcing
setenforce 0

Selinuxはよくわからないので設定を無効のままにしたかったが、setenforce 1 で設定を有効にもどし、許可ポート番号を追加してみたところ疎通が確認できた。

semanage port -a -t http_port_t -p tcp 28080
semanage port -l | grep http_port_t
http_port_t                    tcp      28080, 80, 81, 443, 488, 8008, 8009, 8443, 9000
pegasus_http_port_t            tcp      5988
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?