evggrig
(evggrig)
September 30, 2020, 4:03pm
#1
Hey.
For our convenience, we set up a redirect so that when we enter
server address “mail.example.org ” opened webmail page instead of secure https page.
# cat /etc/httpd/conf.d/webmail.conf
<VirtualHost *:80>
ServerName mail.example.org
Redirect permanent / http://mail.example.org/webmail
</VirtualHost>
But after that, obtaining the Lets Encript certificate stopped working.
Can I configure both of these options to work at the same time?
mrmarkuz
(Markus Neuberger)
September 30, 2020, 6:00pm
#2
Yes, to make letsencrypt work you need to exclude it from the redirect (not tested):
<VirtualHost *:80>
ServerName mail.example.org
RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* http://mail.example.org$0`
</VirtualHost>
Source:
1 Like
evggrig
(evggrig)
October 1, 2020, 7:47am
#3
Hi
I need to make this in file /etc/httpd/conf.d/webmail.conf or enother one? Becouse if yes that didn’t quite work for me …
mrmarkuz
(Markus Neuberger)
October 1, 2020, 8:39am
#4
Yes in the file you created but instead of redirecting to http I recommend to get a letsencrypt cert and go with https.
I can test it later today…