Apache2はリバースプロキシとして機能しませんか?

Apache2はリバースプロキシとして機能しませんか?

こんにちは、Ubuntuでapache2をリバースプロキシに設定しようとしています。サポートのためにTomcat 7があります。設定ファイル/etc/apache2/sites-enabled/example.co.conf

<VirtualHost *:80>
        ServerName example.co
        ServerAlias *example.co
        ServerSignature Off

        RewriteEngine On
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

        ErrorLog /var/log/apache2/redirect.error.log
        LogLevel debug
</VirtualHost>


<VirtualHost *:443>
        ServerName example.co
        ServerAlias *example.co
        ProxyPreserveHost On
        ProxyRequests off
        AllowEncodedSlashes NoDecode

    <Proxy *>
          Order deny,allow
          Allow from all

    </Proxy>

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.co/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        ProxyPass / http://localhost:8080/ nocanon
        ProxyPassReverse / http://localhost:8080/

        RequestHeader set X-Forwarded-Proto "https"
        RequestHeader set X-Forwarded-Port "443"

        LogLevel debug
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

以下を使用して確認しようとしました。

$elinks https://localhost 

動作しますが、外部で試してみると動作しません。

どんな助けでも!

ベストアンサー1

Amazon AWSでポート443が開いていないことがわかりました。ポートを開くと機能しました。この構成は私にとって効果的です。

おすすめ記事