View Single Post
  #12  
Old 29th September 2006, 17:45
arnaud arnaud is offline
Member
 
Join Date: May 2006
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Default update

Hello,

The new configuration works well :
in /root/ispconfig/httpd/conf/httpd.conf
add the following line
Listen 8080

in /home/admispconfig/ispconfig/lib/config.inc.php
change
<code>
if(isset($_SERVER['HTTP_HOST'])){
$go_info["server"]["server_url"] = 'https://'.$_SERVER['HTTP_HOST'];
} else {
$go_info["server"]["server_url"] = "https://exemple.com:81";
}
</code>

to
<code>
if(isset($_SERVER['HTTP_HOST'])){
if(preg_match('/^.+:8080$/', $_SERVER['HTTP_HOST'])) {
$go_info["server"]["server_url"] = 'http://'.$_SERVER['HTTP_HOST'];
} else {
$go_info["server"]["server_url"] = 'https://'.$_SERVER['HTTP_HOST'];
}
} else {
$go_info["server"]["server_url"] = "https://exemple.com:81/";
}
</code>
Certainly regexp can be replaced by substr for speedup.
Reply With Quote