简体   繁体   中英

Using Apache Haus for Reverse Proxy in Windows 10

I install Apache Haus in my Windows 10 PC, that should work as Reverse Proxy.

my setting in httpd-vhosts.conf is like below:

<VirtualHost _default_:80>
    DocumentRoot "$(SRVROOT)/htdocs"
    ProxyRequests off
    ProxyPreserveHost On
    ProxyPass / http://172.17.3.177/
    ProxyPassReverse / http://172.17.3.177/
</VirtualHost>
<VirtualHost _default_:80>
    DocumentRoot "${SRVROOT}/htdocs"
    ProxyRequests off
    ProxyPreserveHost On
    ProxyPass / http://172.17.3.177/
    ProxyPassReverse / http://172.17.3.177/

    SSLEngine on
    SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
</VirtualHost>

When I open http://localhost in browser the website from 172.17.3.177 , successfully rendered (see below pic)

But when I try https://localhost my browser shows failure.

Can anybody help? I already disable windows firewall.

I have never implemented HTTPS on Apache. However, your configuration seems to miss the listening to port 443 which is the default port for HTTPS. You should add

Listen 443 // instruction at global server configuration
<VirtualHost _default_:443> // in your VirtualHost definition

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM