Current time: 01-25-2022, 09:52 AM Hello There, Guest! (LoginRegister)


Post Reply 
A different port for ispCP
Author Message
macbishop Offline
Junior Member
*

Posts: 68
Joined: Feb 2007
Reputation: 7
Post: #1
A different port for ispCP
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
(This post was last modified: 01-11-2008 02:57 AM by macbishop.)
01-09-2008 11:12 AM
Find all posts by this user Quote this message in a reply
macbishop Offline
Junior Member
*

Posts: 68
Joined: Feb 2007
Reputation: 7
Post: #2
RE: A different port for ispCP
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
(This post was last modified: 01-11-2008 03:19 AM by macbishop.)
01-11-2008 02:56 AM
Find all posts by this user Quote this message in a reply
Zothos Offline
Release Manager
*****
Dev Team

Posts: 1,262
Joined: Feb 2007
Reputation: 10
Post: #3
RE: A different port for ispCP
I think this is realy something for our new docuwiki.
thank you very much macbishop Smile.
01-11-2008 03:34 AM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #4
RE: A different port for ispCP
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
01-11-2008 03:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
macbishop Offline
Junior Member
*

Posts: 68
Joined: Feb 2007
Reputation: 7
Post: #5
RE: A different port for ispCP
I have write the howto.

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

Please put into apropiate place.

ThanksWink
--
querer es poder
(This post was last modified: 01-15-2008 08:33 PM by macbishop.)
01-15-2008 11:02 AM
Find all posts by this user Quote this message in a reply
macbishop Offline
Junior Member
*

Posts: 68
Joined: Feb 2007
Reputation: 7
Post: #6
RE: A different port for ispCP
Now: http://www.isp-control.net/ispcp/wiki/howto_defaultport Smile
--
querer es poder
(This post was last modified: 01-15-2008 08:32 PM by macbishop.)
01-15-2008 08:31 PM
Find all posts by this user Quote this message in a reply
BioALIEN Offline
Public Relations Officer
*****
Dev Team

Posts: 620
Joined: Feb 2007
Reputation: 5
Post: #7
RE: A different port for ispCP
Thanks macbishop, your contributions are always welcomed and appreciated here Smile

Keep up the great work. You have my Rep +1!
01-16-2008 12:36 PM
Find all posts by this user Quote this message in a reply
macbishop Offline
Junior Member
*

Posts: 68
Joined: Feb 2007
Reputation: 7
Post: #8
RE: A different port for ispCP
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
01-16-2008 07:46 PM
Find all posts by this user Quote this message in a reply
Zothos Offline
Release Manager
*****
Dev Team

Posts: 1,262
Joined: Feb 2007
Reputation: 10
Post: #9
RE: A different port for ispCP
Someone move this please to Howtos Wink
01-16-2008 10:12 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #10
RE: A different port for ispCP
Zothos Wrote:Someone move this please to Howtos Wink

done
01-16-2008 10:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)