View Single Post
Old 15th August 2008, 12:00
ethanlifka ethanlifka is offline
Junior Member
Join Date: Aug 2008
Posts: 29
Thanks: 0
Thanked 6 Times in 4 Posts
Default RE:

I did this with mod rewrite in /root/ispconfig/scripts/lib/config.lib.php

You can also do this in each site under apache directives, but I wanted it to be global.

In /root/ispconfig/scripts/lib/config.lib.php under "function make_vhost($server_id)"


$web_httpd_include = $web["web_httpd_include"];


//Cpanel Add Directives
$CP_directives = "<IfModule mod_rewrite.c>\n\rRewriteEngine on\n\rRewriteRule ^/cpanel$ [NC]\n\r</IfModule>";
if(isset($web["web_httpd_include"]) && $web["web_httpd_include"] != "")$CP_directives.="\n\r";
$web_httpd_include = $CP_directives.$web["web_httpd_include"];

instead of you could use a variable that references each site so that when they are in the control panel they always see there domain, but you would need a wild card certificate if you are going to use https.

You may also place other global directives in there like open_base_dir or disable_functions. This is perfect becuase it does not have an affect on ispconfig's control panel.

Last edited by ethanlifka; 15th August 2008 at 12:06. Reason: additions
Reply With Quote