All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
VirtualHost on 443 and 80 Apache Reverse Proxy on CentOS 7 [Help Needed]
Hi,
For my VPS
In Apache Cent0S 7 httpd.conf file I've set up Reverse Proxy as follows:
<VirtualHost *:443> ProxyPreserveHost On ServerName www.example.com SSLEngine On SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerExpire off SSLProxyCheckPeerName off SSLInsecureRenegotiation on SSLProxyVerify none SSLVerifyClient none SSLCertificateFile /etc/ssl/certs/example_com.crt SSLCertificateKeyFile /etc/ssl/certs/example_com.key ProxyPass / https://104.194.x.x/ ProxyPassReverse / https://104.194.x.x/ ProxyErrorOverride On </VirtualHost>
my configuration is
Cloudflare (full strict ssl) to vps to cpanel shared hosting
site is only served in https://
on cPanel htaccess, I've forced ssl redirect from http://www. to https://www.
My question is:
in the above httpd.conf file on my vps, do I need to add the following code for port 80 too?
<VirtualHost *:80>
ProxyPreserveHost On
ServerName www.example.com
ProxyPass / http://104.194.x.x/
ProxyPassReverse / http://104.194.x.x/
ProxyErrorOverride On
</VirtualHost>
Comments
I do not really see why you are stacking reverse proxies though?
Given your VPS will never be reached directly, the smart move would be to make CloudFlare always use ONE method of reaching your VPS, thus you only having to configure a single VHost on the VPS.
I also have reverse proxy setup in apache, this is my config running uptime kuma.
thanks. it worked.
@JasonM
So you are using 2 virtual servers (proxy and Cpanel) and CF between them? If yes, this is quite strange; if no, and you have only Cpanel VPS, there is no sense in configuring a proxy virtual host.
Nopes. Its CF, VPS (proxy) and shared cPanel
It is enough that the cPanel generates a config and there is no need to add new virtual hosts