Greetings everyone from a small balkan country named Macedonia
I'm having some issues deploying Cloudron behind an apache2 proxy. This is my current setup:
- Public Gatekeeper Proxy Server > Cloudron VM in a separate location (we use VPN for interconnecting both DCs).
- The domain is proxied through Cloudflare.
- The error I get is: Too many redirects.
So far, I've tried basically everything I can think of and spent days trying Google for a solution. I've used both Flexible and Strict SSL (I installed the certificate on the proxy server only) in Cloudflare. I turned off Cloudflare Proxy and set the domain to DNS-only mode.
I also tried various configurations in the apache2 vhost. This is the one for port 80:
<VirtualHost *:80>
ServerAdmin contact@infoproject.biz
ServerName hero.cloudron
ServerAlias *.hero.cloudron
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests off
SSLProxyEngine on
ProxyPreserveHost on
Header set Access-Control-Allow-Origin "*"
<Location />
ProxyPass http://10.10.9.134/
ProxyPassReverse http://10.10.9.134/
Order allow,deny
Allow from all
</Location>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)\.hero\.cloudron$ [NC]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
And the one for port 443:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin info@hero.cloudron
ServerName hero.cloudron
ServerAlias *.hero.cloudron
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests off
SSLProxyEngine on
ProxyPreserveHost on
Header set Access-Control-Allow-Origin "*"
<Location />
ProxyPass http://10.10.9.134/
ProxyPassReverse http://10.10.9.134/
Order allow,deny
Allow from all
</Location>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/hero.cloudron-cf-origin-ca.pem
SSLCertificateKeyFile /etc/ssl/private/hero.cloudron-cf-private-key.key
</VirtualHost>
</IfModule>
Any help is greatly appreciated. I really do not know what else to try and what else to do. The only way I can expose the Cloudron VM to a public IP with a domain is to proxy the requests.