如何解决如何为反向代理正确配置我的 apache(linux centos7) 虚拟主机以与我的节点应用程序https正常工作
我已经尝试了几天在 linux centos7 生产服务器上使用 node app 为反向代理配置 apache 虚拟主机,但我一直看到默认的 apache 测试页面而不是 node 默认主页。当我在我的机器(本地主机:45000)上运行该应用程序时,它可以工作,但如果运行 domainname.com,我会得到 apache 测试 123 页。下面是我的虚拟主机配置。 DocumentRoot /var/www/html/ 服务器名称 lawspectre.net 服务器别名 www.lawspectre.net ErrorLog /var/log/httpd/lawspectre.net-error_log CustomLog /var/log/httpd/lawspectre.net-access_log 组合
<Directory /var/www/html/>
Options -Indexes +FollowSymLinks
AllowOverride None
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =lawspectre.net [OR]
RewriteCond %{SERVER_NAME} =www.lawspectre.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName lawspectre.net
ServerAlias www.lawspectre.net
ErrorLog /var/log/httpd/lawspectre.net-error_log
CustomLog /var/log/httpd/lawspectre.net-access_log combined
SSLEngine on
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCertificateFile /etc/letsencrypt/live/lawspectre.net/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/lawspectre.net/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/lawspectre.net/chain.pem
#Reverse proxy configuration
ProxyRequests off
ProxyPass / http://localhost:45000
ProxyPassReverse / http://localhost:45000
</VirtualHost>
我需要帮助才能正常工作
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。