Display More
Some people want to secure their admin panel. That means prevent automatical redirects to the login panel when browsing non existing subdomains oder ip of the server. Here's a howto, to solve this problem. (for debian squeeze, should be work with other dist)
go to /etc/imscp/apache/
edit 00_master_fcgi.conf and 00_master_itk.conf
Before the first VirtualHost
set:
edit 00_master_ssl_fcgi.conf and 00_master_ssl_itk.conf
Before the first VirtualHost
set:Code
- <VirtualHost {BASE_SERVER_IP}:443> # # SSL Start # SSLEngine On SSLCertificateFile {GUI_CERT_DIR}/{SERVER_HOSTNAME}.pem SSLCertificateKeyFile {GUI_CERT_DIR}/{SERVER_HOSTNAME}.pem SSLCertificateChainFile {GUI_CERT_DIR}/{SERVER_HOSTNAME}.pem # # SSL End # DocumentRoot {APACHE_WWW_DIR}/default</VirtualHost>
Now create a folder /var/www/virtual/default and create there an index.html or a .htaccess for redirect to another domain..
generate new config files and restart the services
If you want to prevent the redirects /pma /imscp /webmail and /ftp you can solve it in this way..
go to /etc/imscp/apache/parts/
edit there all existing config-files with the lines RedirectMatch and exclude this lines with #
generate new config files and restart the services
PS: maybe the devs can include it in the next version of i-mscp
Re ;
I'll include it if you want in my next commit. Anyway, some review should be made here since BASE_SERVER_IP doesn't cover all situation.
Thanks you for using i-MSCP.