Current time: 11-25-2024, 08:28 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: #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
Post Reply 


Messages In This Thread
A different port for ispCP - macbishop - 01-09-2008, 11:12 AM
RE: A different port for ispCP - macbishop - 01-11-2008 02:56 AM
RE: A different port for ispCP - Zothos - 01-11-2008, 03:34 AM
RE: A different port for ispCP - gOOvER - 01-11-2008, 03:48 AM
RE: A different port for ispCP - macbishop - 01-15-2008, 11:02 AM
RE: A different port for ispCP - macbishop - 01-15-2008, 08:31 PM
RE: A different port for ispCP - BioALIEN - 01-16-2008, 12:36 PM
RE: A different port for ispCP - macbishop - 01-16-2008, 07:46 PM
RE: A different port for ispCP - Zothos - 01-16-2008, 10:12 PM
RE: A different port for ispCP - joximu - 01-16-2008, 10:15 PM
RE: A different port for ispCP - Eminos - 01-17-2008, 03:43 AM
RE: A different port for ispCP - raphael - 01-17-2008, 08:31 AM
RE: A different port for ispCP - macbishop - 01-17-2008, 10:07 AM
RE: A different port for ispCP - Cube - 05-08-2008, 10:02 PM

Forum Jump:


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