OnTheRun
5th January 2006, 10:45
Hello all,
I have the following problem:
I'm using a php-script, which uses the fsockopen-function. The scrip gets executed from the server (i.e. domain.ch) itself on itself:
fsockopen ("www.domain.ch", 80, $errno, $errstr, 30);
First he didn't knew his own domains, so I had the idea, that it sure wouldn't be bad to add the domainnames to /etc/hosts.
The server now knows the domains, but doesn't forward them correctly to the
corresponding vhost.
The vhost is i.e.:
<VirtualHost 10.0.0.17:80>
ServerName www.domain.ch:80
ServerAdmin webmaster@domain.ch
DocumentRoot /var/www/webX/web
ServerAlias www.domain.ch domain.ch ftp.domain.ch subdomain.domain.ch subdomain2.domain.ch subdomain3.domain.ch
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/webX/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/webX/log/error.log
He forwards not to /var/www/webX/web as it's defined in the vhosts-file, but he forwards to /var/www/apache2-default (I tried this by using links2 www.domain.ch on the server itself).
The system is Debian 3.1 with apache 2 and ISPConfig.
I checked the logs. In error.log is nothing, in access.log the following:
127.0.0.1 - - [05/Jan/2006:09:06:52 +0100] "GET / HTTP/1.1" 302 390 "-" "Links (2.1pre16; Linux 2.4.32 i686; 80x24)"
127.0.0.1 - - [05/Jan/2006:09:06:52 +0100] "GET /apache2-default/ HTTP/1.1" 200 1457 "-" "Links (2.1pre16; Linux 2.4.32 i686; 80x24)"
Has anybody a clue how I can tell the server to use the vhosts-file when a request comes from 127.0.0.1/localhost?
Thanks and with kind regards
I have the following problem:
I'm using a php-script, which uses the fsockopen-function. The scrip gets executed from the server (i.e. domain.ch) itself on itself:
fsockopen ("www.domain.ch", 80, $errno, $errstr, 30);
First he didn't knew his own domains, so I had the idea, that it sure wouldn't be bad to add the domainnames to /etc/hosts.
The server now knows the domains, but doesn't forward them correctly to the
corresponding vhost.
The vhost is i.e.:
<VirtualHost 10.0.0.17:80>
ServerName www.domain.ch:80
ServerAdmin webmaster@domain.ch
DocumentRoot /var/www/webX/web
ServerAlias www.domain.ch domain.ch ftp.domain.ch subdomain.domain.ch subdomain2.domain.ch subdomain3.domain.ch
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/webX/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/webX/log/error.log
He forwards not to /var/www/webX/web as it's defined in the vhosts-file, but he forwards to /var/www/apache2-default (I tried this by using links2 www.domain.ch on the server itself).
The system is Debian 3.1 with apache 2 and ISPConfig.
I checked the logs. In error.log is nothing, in access.log the following:
127.0.0.1 - - [05/Jan/2006:09:06:52 +0100] "GET / HTTP/1.1" 302 390 "-" "Links (2.1pre16; Linux 2.4.32 i686; 80x24)"
127.0.0.1 - - [05/Jan/2006:09:06:52 +0100] "GET /apache2-default/ HTTP/1.1" 200 1457 "-" "Links (2.1pre16; Linux 2.4.32 i686; 80x24)"
Has anybody a clue how I can tell the server to use the vhosts-file when a request comes from 127.0.0.1/localhost?
Thanks and with kind regards