Post Reply  Post Thread 
Pages (2): « First [1] 2 Next > Last »
A different port for ispCP
Author Message
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
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
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
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
Member
****
Dev Team

Posts: 581
Group: Dev Team
Joined: Feb 2007
Status: Offline
Reputation: 7
Post: #3
RE: A different port for ispCP

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


Real programmers don't comment their code - it was hard to write, it should be hard to understand

OS : Gentoo 32bit Stage1
ispCP Version : RC4
Mods : Dovecot | Pure-ftpd

01-11-2008 03:34 AM
Find all posts by this user Quote this message in a reply
gOOvER
Documentation Team
***
Docu Team

Posts: 1,283
Group: Docu Team
Joined: Jul 2007
Status: Offline
Reputation: 11
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


OS : Debian 4.0 Etch 64bit
ispCP Version : RC6 r1257 - 01.07.08 (NightlyBuild)
Activated : AWStats dynamic
Mods : none
->SmileThis Signature is OpenSourceSmile<-
01-11-2008 03:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
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
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
Post: #6
RE: A different port for ispCP

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
Junior Member
**
Graph Team

Posts: 209
Group: Graph Team
Joined: Feb 2007
Status: Offline
Reputation: 0
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!


BioALIEN
OS: Debian 4.0 Etch
ispCP Build: RC3 r953 - 28.12.07
Mods: AWStats dynamic
01-16-2008 12:36 PM
Find all posts by this user Quote this message in a reply
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
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
Member
****
Dev Team

Posts: 581
Group: Dev Team
Joined: Feb 2007
Status: Offline
Reputation: 7
Post: #9
RE: A different port for ispCP

Someone move this please to Howtos Wink


Real programmers don't comment their code - it was hard to write, it should be hard to understand

OS : Gentoo 32bit Stage1
ispCP Version : RC4
Mods : Dovecot | Pure-ftpd

01-16-2008 10:12 PM
Find all posts by this user Quote this message in a reply
joximu
Moderator
*****


Posts: 3,534
Group: Moderators
Joined: Jan 2007
Status: Offline
Reputation: 47
Post: #10
RE: A different port for ispCP

Zothos Wrote:
Someone move this please to Howtos Wink


done


2008-03-16 ispCP RC4 released!!!
01-16-2008 10:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pages (2): « First [1] 2 Next > Last »
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump:

| All rights reserved : isp-control.net |