ispCP - Board - Support - VHCS fork

Full Version: A different port for ispCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Long I have installed ispCP from trunk-20070627 with the domain name of ispcp in the installation as domain.tld.

After I have changed in /etc/apache2/sites-available/00_master.conf
Code:
<VirtualHost x.x.x.x:80>
to
Code:
<VirtualHost x.x.x.x:348>
and added in /etc/apache2/ports.conf the line
Code:
Listen 348
also in /etc/ispcp/ispcp.conf changed the line to
Code:
BASE_SERVER_VHOST = domain.tld:348
Thereby the login with any virtual domain is http://virtual_domain.tld:348.

This configuration runs fine without error for this trunk, but I have installed the 953 revision with this configuration and the login page appear correctly but on enter admin login the browser shows in the direction field the URL: http://virtual_domain.tld:348/admin/index.php but return the error:
Code:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
after if I paste the URL http://virtual_domain.tld:348 in the direction field and press enter the main admin page appear but with some ispCP message lines:
Code:
Request from foreign host was blocked!
if I press enter for the third time the page appear correctly.

This occur with any section of panel (for example: manage users ) if I press the Manage User button the server return redirect error, but if I paste http://virtual_domain.tld:348/admin/manage_users.php and enter from the direction field of the browser the page appear correctly

Any ideas ?
--
querer es poder
solved.

1. In /etc/apache2/sites-available/00_master.conf I have changed
Code:
ServerName domain.tld
to
Code:
ServerName domain.tld:348

2. In /var/www/ispcp/gui/include/login.php in line 188
Code:
if ($checkReferer) {
        if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {

            $info = parse_url($_SERVER['HTTP_REFERER']);
            if (isset($info['host']) && !empty($info['host'])) {
                if ($info['host'] != $_SERVER['HTTP_HOST'] || $info['host'] != $_SERVER['SERVER_NAME']) {
                    set_page_message(tr('Request from foreign host was blocked!'));
                    redirect_to_level_page();
                }
            }
        }
}
I have changed to
Code:
if ($checkReferer) {
        if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {

            $info = parse_url($_SERVER['HTTP_REFERER']);
            if (isset($info['host']) && !empty($info['host'])) {
                if ($_SERVER['SERVER_PORT']!=80) {                
                    if ($info['host'].':'.$_SERVER['SERVER_PORT'] != $_SERVER['HTTP_HOST']|| $info['host'].':'.$_SERVER['SERVER_PORT'] != $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']) {
                    set_page_message(tr('Request from foreign host was blocked!'));
                    redirect_to_level_page();
                    }
                }else{
                    if ($info['host'] != $_SERVER['HTTP_HOST'] || $info['host'] != $_SERVER['SERVER_NAME']) {
                    set_page_message(tr('Request from foreign host was blocked!'));
                    redirect_to_level_page();
                    }
                }
             }    
        }
}
--
querer es poder
I think this is realy something for our new docuwiki.
thank you very much macbishop Smile.
At the Moment the howto's will stay at the old Place. When the docu is ready, i will try to move all the HowTo's to Dokuwiki Smile
I have write the howto.

http://www.isp-control.net/ispcp/wiki/ho...ite_howtos

Please put into apropiate place.

ThanksWink
--
querer es poder
Thanks macbishop, your contributions are always welcomed and appreciated here Smile

Keep up the great work. You have my Rep +1!
BioALIEN Wrote:Thanks macbishop, your contributions are always welcomed and appreciated here Smile

Keep up the great work. You have my Rep +1!

Updated the howto (listen line in /etc/apache2/ports.conf)


Thank you and also to rbtux and gOOvER.

Big GrinI like this communityBig Grin

--
querer es poder
Someone move this please to Howtos Wink
Zothos Wrote:Someone move this please to Howtos Wink

done
Pages: 1 2
Reference URL's