ispCP - Board - Support
A different port for ispCP - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: A different port for ispCP (/thread-2114.html)

Pages: 1 2


A different port for ispCP - macbishop - 01-09-2008 11:12 AM

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


RE: A different port for ispCP - macbishop - 01-11-2008 02:56 AM

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


RE: A different port for ispCP - Zothos - 01-11-2008 03:34 AM

I think this is realy something for our new docuwiki.
thank you very much macbishop Smile.


RE: A different port for ispCP - gOOvER - 01-11-2008 03:48 AM

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


RE: A different port for ispCP - macbishop - 01-15-2008 11:02 AM

I have write the howto.

http://www.isp-control.net/ispcp/wiki/howto_write_howtos

Please put into apropiate place.

ThanksWink
--
querer es poder


RE: A different port for ispCP - macbishop - 01-15-2008 08:31 PM

Now: http://www.isp-control.net/ispcp/wiki/howto_defaultport Smile
--
querer es poder


RE: A different port for ispCP - BioALIEN - 01-16-2008 12:36 PM

Thanks macbishop, your contributions are always welcomed and appreciated here Smile

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


RE: A different port for ispCP - macbishop - 01-16-2008 07:46 PM

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


RE: A different port for ispCP - Zothos - 01-16-2008 10:12 PM

Someone move this please to Howtos Wink


RE: A different port for ispCP - joximu - 01-16-2008 10:15 PM

Zothos Wrote:Someone move this please to Howtos Wink

done