I have tried for several days to configure apache virtual host for reverse proxy with node app on a linux centos7 production server but I keep seeing the default apache testing page instead of the node default home page. When I run the app on my machine(localhost:45000) it works but if run the domainname.com I get the apache testing 123 page.Below is my virtual host config.
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName lawspectre.net
ServerAlias www.lawspectre.net
ErrorLog /var/log/httpd/lawspectre.net-error_log
CustomLog /var/log/httpd/lawspectre.net-access_log combined
<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>
I need help in getting this working properly
question from:
https://stackoverflow.com/questions/65841096/how-do-i-properly-configure-my-apachelinux-centos7-virtual-host-for-reverse-pr 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…