Getting Virtual hosts working apache2 / rh9

After much stuffing around with ssl.conf and various other configs, i finally got virtual hosts to work..

I kept getting the error

[error] VirtualHost default:443 – mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

there seems to be a heap of people out there getting this error, so here is my solution, which works for me……

In the end I didnt need to touch the ssl.conf file, just leave that as is.

in your httpd.conf do the following.

=======8<========

NameVirtualHost *:80

NameVirtualHost *:433

ServerAdmin webmaster@your-server.com

DocumentRoot /var/www/html

ServerName li-*.member.linode.com

ErrorLog /var/www/html/virtual/logs/error_log

CustomLog /var/www/html/virtual/logs/access_log common

ServerAdmin webmaster@your-server.com

DocumentRoot /var/www/html/virtual/site1/html

ServerName anotherdomain.com

ServerAlias *.anotherdomain.com anotherdomain.com

ErrorLog /var/www/html/virtual/site1/logs/error_log

CustomLog /var/www/html/virtual/site1/logs/access_log common

=======>8========

Hope it helps someone…

1 Reply

I just use webmin (http://www.webmin.com) which can handle apache virtual servers fine, if you install the apache module.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct