Hi, I'm trying to get virtual hosts, but I'm having a little problem. I set up two vhosts : webmail, and mailadmin. When I point my browser to one of both, using their "short name" (=like noted above) things work OK. But when I use the FQDN, things go wrong, for one of them. The FQDN of webmail uses mailadmin's directory. I even added a section for the FQDN of my vhosts in the configuration files in vhosts.d, with the same result. The last thing I did was to make another vhost, pointing to the regular htdocs directory, and now the FQDN of webmail uses that to fetch it's data. What am I doing wrong ? I can post the conf-files if needed. I'm using SuSE 9.0, with its standard apache2. TIA -- Met vriendelijke groeten, Koenraad Lelong R&D Manager ACE electronics n.v.
On Monday 14 June 2004 17:24, Koenraad Lelong wrote:
Hi, I'm trying to get virtual hosts, but I'm having a little problem. I set up two vhosts : webmail, and mailadmin. When I point my browser to one of both, using their "short name" (=like noted above) things work OK. But when I use the FQDN, things go wrong, for one of them. The FQDN of webmail uses mailadmin's directory. I even added a section for the FQDN of my vhosts in the configuration files in vhosts.d, with the same result. The last thing I did was to make another vhost, pointing to the regular htdocs directory, and now the FQDN of webmail uses that to fetch it's data. What am I doing wrong ? I can post the conf-files if needed. I'm using SuSE 9.0, with its standard apache2.
In /etc/apache2/listen.conf, did you uncomment the line with: #NameVirtualHost *:80 Cheers, Leen
On Mon, Jun 14, 2004 at 05:24:30PM +0200, Koenraad Lelong wrote:
Hi, I'm trying to get virtual hosts, but I'm having a little problem. I set up two vhosts : webmail, and mailadmin. When I point my browser to one of both, using their "short name" (=like noted above) things work OK. But when I use the FQDN, things go wrong, for one of them. The FQDN of webmail uses mailadmin's directory. I even added a section for the FQDN of my vhosts in the configuration files in vhosts.d, with the same result. The last thing I did was to make another vhost, pointing to the regular htdocs directory, and now the FQDN of webmail uses that to fetch it's data. What am I doing wrong ? I can post the conf-files if needed. I'm using SuSE 9.0, with its standard apache2.
What _exactly_ does the server's response contain (status code)? Sorry, but guessing what you actually mean with "things go wrong" is not an option. Use 'curl -sI <url>' to look at the servers response to a HEAD request. Use httpd2 -S to check your virtual host setup. Peter
On Mon, Jun 14, 2004 at 05:24:30PM +0200, Koenraad Lelong wrote:
Hi, I'm trying to get virtual hosts, but I'm having a little problem. I set up two vhosts : webmail, and mailadmin. When I point my browser to one of both, using their "short name" (=like noted above) things work OK. But when I use the FQDN, things go wrong, for one of them. The FQDN of webmail uses mailadmin's directory. I even added a section for the FQDN of my vhosts in the configuration files in vhosts.d, with the same result. The last thing I did was to make another vhost, pointing to the regular htdocs directory, and now the FQDN of webmail uses that to fetch it's data. What am I doing wrong ? I can post the conf-files if needed. I'm using SuSE 9.0, with its standard apache2.
What _exactly_ does the server's response contain (status code)?
Sorry, but guessing what you actually mean with "things go wrong" is not an option.
Use 'curl -sI <url>' to look at the servers response to a HEAD request.
Use httpd2 -S to check your virtual host setup.
Peter I thought I said that : if I use the FQDN of webmail, I get the contents of mailadmin's page. Now it's changed, with your suggested commands I found an error in the .conf files and corrected this, but the problem is similar : when I use
poeml@cmdline.net wrote: the FQDN of mailadmin I get the default page. I added \ to indicate that text continues on the following line : lace3:~ # httpd2 -S VirtualHost configuration: 192.168.0.2:80 is a NameVirtualHost default server lace3.ace-electronics.be \ (/etc/apache2/vhosts.d/_ace.conf:7) port 80 namevhost lace3.ace-electronics.be \ (/etc/apache2/vhosts.d/_ace.conf:7) port 80 namevhost mailadmin.ace-electronics.be \ (/etc/apache2/vhosts.d/postfixadmin.conf:7) port 80 namevhost webmail.ace-electronics.be \ (/etc/apache2/vhosts.d/webmail.conf:7) 192.168.0.2:8080 pac.ace-electronics.be \ (/etc/apache2/vhosts.d/pac.conf:7) Syntax OK lace3:~ # curl -sI webmail HTTP/1.1 302 Found Date: Tue, 15 Jun 2004 07:59:26 GMT Server: Apache/2.0.48 (Linux/SuSE) X-Powered-By: PHP/4.3.3 Location: src/login.php Content-Type: text/html; charset=ISO-8859-1 lace3:~ # curl -sI webmail.ace-electronics.be HTTP/1.1 302 Found Date: Tue, 15 Jun 2004 07:59:31 GMT Server: Apache/2.0.48 (Linux/SuSE) X-Powered-By: PHP/4.3.3 Location: src/login.php Content-Type: text/html; charset=ISO-8859-1 lace3:~ # curl -sI mailadmin HTTP/1.1 302 Found Date: Tue, 15 Jun 2004 07:59:36 GMT Server: Apache/2.0.48 (Linux/SuSE) X-Powered-By: PHP/4.3.3 Location: login.php Content-Type: text/html; charset=ISO-8859-1 lace3:~ # curl -sI mailadmin.ace-electronics.be HTTP/1.1 302 Found Date: Tue, 15 Jun 2004 07:59:42 GMT Server: Apache/2.0.48 (Linux/SuSE) X-Powered-By: PHP/4.3.3 Location: login.php Content-Type: text/html; charset=ISO-8859-1 -- Met vriendelijke groeten, Koenraad Lelong R&D Manager ACE electronics n.v.
Koenraad Lelong wrote:
poeml@cmdline.net wrote:
On Mon, Jun 14, 2004 at 05:24:30PM +0200, Koenraad Lelong wrote:
Hi, I'm trying to get virtual hosts, but I'm having a little problem. I set up two vhosts : webmail, and mailadmin. When I point my browser to one of both, using their "short name" (=like noted above) things work OK. But when I use the FQDN, things go wrong, for one of them. The FQDN of webmail uses mailadmin's directory. I even added a section for the FQDN of my vhosts in the configuration files in vhosts.d, with the same result. The last thing I did was to make another vhost, pointing to the regular htdocs directory, and now the FQDN of webmail uses that to fetch it's data. What am I doing wrong ? I can post the conf-files if needed. I'm using SuSE 9.0, with its standard apache2.
What _exactly_ does the server's response contain (status code)?
Sorry, but guessing what you actually mean with "things go wrong" is not an option.
Use 'curl -sI <url>' to look at the servers response to a HEAD request.
Use httpd2 -S to check your virtual host setup.
Peter
I thought I said that : if I use the FQDN of webmail, I get the contents of mailadmin's page. Now it's changed, with your suggested commands I found an error in the .conf files and corrected this, but the problem is similar : when I use the FQDN of mailadmin I get the default page.
I don't know why, but everything works fine now (I think). The only thing I did was rebooting the machine. And yes, I restarted apache after the changes in the configuration (rcapache2 restart). -- Met vriendelijke groeten, Koenraad Lelong R&D Manager ACE electronics n.v.
participants (3)
-
Koenraad Lelong
-
Leendert Meyer
-
poeml@cmdline.net