How to force Webmail to use SSL in VestaCP

Date Posted : 10/01/2019

In this tutorial, we are going to explain you about forcing webmail http requests to https automatically.

In order to achieve it, you can edit /var/lib/roundcube/.htaccess file and add the below rules under RewriteRule section

#force SSL usage
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

We’re going to verify it using curl request.

$ curl -I http://mail.pheonixsolutions.com/webmail/
HTTP/1.1 302 Found
Server: nginx
Date: Thu, 10 Jan 2019 07:10:57 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://mail.pheonixsolutions.com/webmail/

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Reply

Scroll to Top