furioussnail Posted August 18, 2017 Report Posted August 18, 2017 Hello. Not sure where I make the mistake but I get "redirected you too many times" error when setting up a second company. Logs show nothing related to this. My OS is CentOS 7, PHP 7.0.22, Apache 2.4.6. I have the following config in Apache: <VirtualHost *:80> ServerName cp.example.com Redirect permanent / https://cp.example.com/ </VirtualHost> <VirtualHost *:443> ServerAdmin admin@example.com DocumentRoot "/path/to/html" ServerName cp.example.com ErrorLog "/path/to/error.log" CustomLog "/path/to/access.log" common <Directory "/"> AllowOverride None Require all granted </Directory> SSLEngine on SSLCertificateFile /path/to/certificate/file SSLCertificateKeyFile /path/to/key/file</VirtualHost> Please help me to get this working. Thank you. Quote
0 Blesta Addons Posted August 18, 2017 Report Posted August 18, 2017 where is the second domain, you need to add it to your nginx conf Quote
0 Paul Posted August 18, 2017 Report Posted August 18, 2017 Yes, for the other domain you should have another virtualhost. Also, is it possible this rule is causing the redirect loop? You might try removing it and seeing if that corrects the loop condition. Redirect permanent / https://cp.example.com/ Quote
0 furioussnail Posted August 19, 2017 Author Report Posted August 19, 2017 The redirect helped but it is strange. Does blesta have a HTTPS redirect builtin? Thank you. Quote
0 furioussnail Posted August 19, 2017 Author Report Posted August 19, 2017 Nevermind, the redirect was enabled through CloudFlare. Thank you. Quote
0 Paul Posted August 19, 2017 Report Posted August 19, 2017 Just now, furioussnail said: Nevermind, the redirect was enabled through CloudFlare. Thank you. All working? Quote
0 furioussnail Posted September 4, 2017 Author Report Posted September 4, 2017 Sorry for the delay. Yes, everything is working. I disabled CloudFlare and enabled it back on. No changes and it works. Strange. Thank you. Quote
Question
furioussnail
Hello.
Not sure where I make the mistake but I get "redirected you too many times" error when setting up a second company. Logs show nothing related to this. My OS is CentOS 7, PHP 7.0.22, Apache 2.4.6. I have the following config in Apache:
<VirtualHost *:80>
ServerName cp.example.com
Redirect permanent / https://cp.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerAdmin admin@example.com
DocumentRoot "/path/to/html"
ServerName cp.example.com
ErrorLog "/path/to/error.log"
CustomLog "/path/to/access.log" common
<Directory "/">
AllowOverride None
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /path/to/certificate/file
SSLCertificateKeyFile /path/to/key/file
</VirtualHost>
Please help me to get this working.
Thank you.
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.