Hey Guys,
im using IMSCP for 3 months now and i love it.
Im a newbie administrator and still learning (its just a test enviroment).
Right now im trying to secure the system (add protected areas, iptables, change ssh port...)
I want to protect the /htdocs directory using a basic auth (protected areas), but i want to run it over ssl.
The problem is:
I get the auth prompt two times.
connecting to Port 80 -> auth prompt -> rewriting to port 443 -> auth prompt.
I want it to work that way:
www.domain.com:80 -> rewriting -> www.domain.com:443 -> auth prompt
domain.com:80 -> rewriting -> www.domain.com:443 -> auth prompt
Thats whats in the .htaccess file right now.
- ### START i-MSCP PROTECTION ###
- AuthType Basic
- AuthName "Webinterface"
- AuthUserFile /var/www/virtual/domain.com/.htpasswd
- Require user XYZ
- ### END i-MSCP PROTECTION ###
- RewriteEngine On
- RewriteCond %{HTTPS} !=on
- RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
Any suggestions?
Its a debian 8 Server btw.
Im looking forward to your replies.
kind regards
eomer