LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Setting up apache virtual host in redhat linux (https://www.linuxquestions.org/questions/linux-server-73/setting-up-apache-virtual-host-in-redhat-linux-624448/)

chu2654 02-28-2008 06:04 AM

Setting up apache virtual host in redhat linux
 
After configuring httpd.conf, I restart httpd. But there is an error message:

[error] VirtualHost _default_:443 --mixing * ports and non_* ports with a NameVirtualHost address is not supported, proceeding with undefined results.

When browing, There is also error message.

Bad request!
Your browser sent a request that this server could not understand.


How can I solve this problem ?


Thanks.

lord-fu 02-28-2008 07:47 AM

Hi.

What do you have for

ServerName *
NameVirtualHost *

And then the
<VirtualHost *>
ServerName domain.com
</VirtualHost>


Most likely you just have a definition already in place and are mucking it up a bit by confusing apache.

hth

chu2654 02-28-2008 07:13 PM

the httpd.conf configuration
 
Quote:

Originally Posted by lord-fu (Post 3072586)
Hi.

What do you have for

ServerName *
NameVirtualHost *

And then the
<VirtualHost *>
ServerName domain.com
</VirtualHost>


Most likely you just have a definition already in place and are mucking it up a bit by confusing apache.

hth


httpd.conf

NameVirtualHost *

<VirtualHost *>
.......
ServerName www.redhat.com.tw
DocumentRoot /var/www
</VirtualHost>
<VirtualHost *>
.......
ServerName Virtual.redhat.com.tw
DocumentRoot /var/virtual
</VirtualHost>

Lantzvillian 02-28-2008 10:06 PM

I remember doing something similar with zimbra and apache since I was running a web server on the box. You can tell it somewhere in the httpd.conf file to listen on https port of 443 as well if that is what you are trying to do.

gilead 02-28-2008 10:20 PM

You are using port 443, so I assume you're using SSL. It also looks like you're trying to use name based virtual hosts which won't work with SSL. Have a look on the Apache site here and here for more info.


All times are GMT -5. The time now is 01:21 PM.