VirtualHost problem

VirtualHost problem

am 12.10.2007 15:02:27 von william.hooper

Hi, I have read the documents but what the canges I made to
apache.conf have now broken it!

All I did was paste the following at the end of the apache.cong file:

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80



DocumentRoot /www/
ServerName www.mydomain.com

# Other directives here





DocumentRoot /www/myotherfolder
ServerName www.myotherdomain.com

# Other directives here




whats wrong with this please?

Re: VirtualHost problem

am 12.10.2007 15:07:50 von phantom

wrote in message
news:1192194147.057859.74200@e9g2000prf.googlegroups.com...
> Hi, I have read the documents but what the canges I made to
> apache.conf have now broken it!
>
> All I did was paste the following at the end of the apache.cong file:
>
> # Ensure that Apache listens on port 80
> Listen 80
>
> # Listen for virtual host requests on all IP addresses
> NameVirtualHost *:80
>
>


To start with, the VirtualHost entry needs to agree with the
NameVirtualHost -


Further than that, you may want to tell us what you mean by broken and maybe
give us some error messages to work with.

Re: VirtualHost problem

am 12.10.2007 15:21:38 von william.hooper

I have this qnap linux machine in a little box (no screen, keyboard
etc) that works as a media server and web server. I can't figure out
where the log files are and it does not give you error mesages. When I
made the changes it just refuses to start apache.

I don't understand what you mean about "To start with, the VirtualHost
entry needs to agree with the
NameVirtualHost - ".

I just took this code from this eample:

http://httpd.apache.org/docs/1.3/vhosts/examples.html#purena me

Re: VirtualHost problem

am 12.10.2007 16:23:26 von phantom

wrote in message
news:1192195298.048892.10290@i38g2000prf.googlegroups.com...
>I have this qnap linux machine in a little box (no screen, keyboard
> etc) that works as a media server and web server. I can't figure out
> where the log files are and it does not give you error mesages. When I
> made the changes it just refuses to start apache.
>
> I don't understand what you mean about "To start with, the VirtualHost
> entry needs to agree with the
> NameVirtualHost - ".
>
> I just took this code from this eample:
>
> http://httpd.apache.org/docs/1.3/vhosts/examples.html#purena me
>

that example is correct, what you had was wrong.

What I meant... If you have the line:
NameVirtualHost *:80

then the '*:80' bit NEEDS to apppear in your VirtualHost part, as in:

....


not just

....


As for log files, have you tried looking in the usual place -
/var/log/httpd/ ?

Re: VirtualHost problem

am 12.10.2007 16:25:39 von phantom

wrote in message
news:1192195298.048892.10290@i38g2000prf.googlegroups.com...
>I have this qnap linux machine in a little box (no screen, keyboard
> etc) that works as a media server and web server. I can't figure out
> where the log files are and it does not give you error mesages. When I
> made the changes it just refuses to start apache.
>
> I don't understand what you mean about "To start with, the VirtualHost
> entry needs to agree with the
> NameVirtualHost - ".
>
> I just took this code from this eample:
>
> http://httpd.apache.org/docs/1.3/vhosts/examples.html#purena me
>

having seen your other post, I'd guess that you ended up with a conf file
containing both

Port 80
and
Listen 80

You only need one, remove the other.

Re: VirtualHost problem

am 13.10.2007 17:49:21 von william.hooper

ah it's all done at last... i just post here to make the thread
complete in case someone ever reads it again on google groups etc.


http://forum.qnap.com/phpbb2/viewtopic.php?t=527&postdays=0& postorder=asc&start=20

it took me three days but i think i was unlucky.