1

我在 Apache 中有一个虚拟主机,它让我很适合。我正在尝试通过 Apache 将安全的外部 URL 指向我们网络中的 Maximo Java 虚拟机。这是我的 conf 文件中的虚拟主机。

   <VirtualHost 5.5.5.5:443>
    ServerName maximolink.mydomain.com
    SSLProxyEngine On
    SSLEngine on

    # Turn on SSL
    SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
    # Path to DigiCert Certificate
    SSLCertificateChainFile /etc/httpd/conf/ssl.crt/certs/DigiCertCA.crt
    # Path to gafoc certificate
    SSLCertificateFile /etc/httpd/conf/ssl.crt/certs/star_gafoc_com.crt
    # Path to SSL key generated during creation of CSR
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/maximolink.mydomain.com.key

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyVia full
    EnableSendFile On
    EnableMMAP On

    RewriteEngine On

    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    # Turn on the proxy
    ProxyPass / https://internalmaximoserver.mydomain.com:9451/
    ProxyPassReverse / https://internalmaximoserver.mydomain.com:9451/

    CustomLog /var/log/httpd/ssl-access.log combined
    ErrorLog /var/log/httpd/ssl-error.log

    <Location />
            #ProxyPassReverse /
            Order allow,deny
            allow from all
    </Location>

</VirtualHost>

结果是,我可以去当我去时: https ://maximolink.mydomain.com/maximo/

一些流量开始在服务器(图像,html)之间传递,但最终文件路径开始请求并以 https://maximolink.mydomain.com:9451/maximo/的形式传递—— 我不知道如何停止 9451在流量传递期间附加到 URL。

4

1 回答 1

0

好的,我必须通过在 9451 上侦听并设置命名虚拟主机来调整 conf 文件。这是更新的代码:`

Listen 9451
NameVirtualHost 5.5.5.5:9451
<VirtualHost 5.5.5.5:443 5.5.5.5:9451>
    ServerName maximolink.mydomain.com
    SSLProxyEngine On
    SSLEngine on

    # Turn on SSL
    SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
    # Path to DigiCert Certificate
    SSLCertificateChainFile /etc/httpd/conf/ssl.crt/certs/DigiCertCA.crt
    # Path to gafoc certificate
    SSLCertificateFile /etc/httpd/conf/ssl.crt/certs/star_gafoc_com.crt
    # Path to SSL key generated during creation of CSR
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/maximolink.mydomain.com.key

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyVia full
    EnableSendFile On
    EnableMMAP On

    RewriteEngine On

    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    # Turn on the proxy
    ProxyPass / https://internalmaximoserver.mydomain.com:9451/

    CustomLog /var/log/httpd/ssl-access.log combined
    ErrorLog /var/log/httpd/ssl-error.log

    <Location />
            ProxyPassReverse /
            Order allow,deny
            allow from all
    </Location>

</VirtualHost>

`

这似乎有效。祝你好运!

于 2015-10-16T17:20:57.110 回答