Hi, i'm a college student new to linux and apache, and im trying to get apache to run a couple of websites. I think i've got the main bits of the httpd.conf file sorted, it all kinda works until i start messing around with the virtual hosts section. I add a new virtual host, and when you type in the internet addy, it simply wont work. On some websites it wont display and for some reason just on this one it displays the apache test page? Can anyone help, not sure what im doing right or wrong here lol thanks dan
hi, thanks for the quick responce, to the httpd file i added just a simple virtual server which i was to think would work <VirtualHost www.dansaycool.co.uk> DocumentRoot /www/dansaycool/ ServerName www.dansaycool.co.uk </VirtualHost> i'm trying to set up this website using name-based virtual hosting. [Sat Jun 10 21:29:17 2006] [error] [client 192.168.1.1] (13)Permission denied: file permissions deny server access: /www/dansaycool/index.html [Sat Jun 10 21:32:13 2006] [notice] SIGHUP received. Attempting to restart [Sat Jun 10 21:32:14 2006] [notice] Apache/1.3.36 (Unix) configured -- resuming normal operations [Sat Jun 10 21:32:14 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sat Jun 10 21:35:26 2006] [notice] SIGHUP received. Attempting to restart [Sat Jun 10 21:35:26 2006] [warn] NameVirtualHost *:80 has no VirtualHosts [Sat Jun 10 21:35:27 2006] [notice] Apache/1.3.36 (Unix) configured -- resuming normal operations [Sat Jun 10 21:35:27 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sat Jun 10 21:40:04 2006] [notice] SIGHUP received. Attempting to restart [Sat Jun 10 21:40:04 2006] [warn] NameVirtualHost *:80 has no VirtualHosts [Sat Jun 10 21:40:05 2006] [notice] Apache/1.3.36 (Unix) configured -- resuming normal operations [Sat Jun 10 21:40:05 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) And this is mainly what is is saying in the error logs, i have tried quite a few different configurations for the domain in the virtual server section, but none of them seem to work. The current configuration that i have is in the httpd extract above ^^^ at the top. Thanks again dan
Please try this vhost: NameVirtualHost 192.168.0.1 <VirtualHost 192.168.0.1> DocumentRoot /www/dansaycool/ ServerName www.dansaycool.co.uk </VirtualHost> Replace 192.168.0.1 with your IP, if you rae behind a router, you must use your internal IP.
Thanks for that, i've changed my virtual host to this NameVirtualHost 192.168.1.10 <VirtualHost 192.168.1.10> DocumentRoot /www/dansaycool/ ServerName www.dansaycool.co.uk </VirtualHost> but unfortunatly its still not working, keeps coming up with the error message page can not be displayed. My internal ip address for the computer is 192.168.1.10 and my routers addy is 192.168.1.1. I think ive done that bit right. Can you think of any other reasons that it may not be working. Many thanks dan
ye im tryin to view www.dansaycool.co.uk from other computers on my network. I think i may have nearly got it working, because if you type my static ip address in on a browser, the apache test page appears. And if you type in http://dansaycool.co.uk the page i created appears, bt the webaddres is meant to be www.dansaycool.co.uk not http://dansaycool.co.uk. Is there a way round this. Also i made a second virtual host with a different document directy but the dansaycool.co.uk webpage keeps appearing? Hope this has shed some light on the problems lol thanks again dan
Please add this line to your vhost configuration and restart Apache: Code: ServerAlias www.dansaycool.co.uk
hi, thanks again yea i just added that to the httpd file and restarted apache, but today it doesnt seem to want to work at all, type in www.dansaycool.co.uk, "the page can not be displayed" "invalid syntax error". even if you type in http://dansaycool.co.uk it wont work.
hi, thankyou soo much i got it working finally, i think it had something to do wit the server alias. I would like to know now if anyone knows how to install frontpage extensions. i do have a breif idea on how to install them, but i dont knw how to add virtual servers to them. many thanks once again dan
I don't think it's a good idea to install frontpage. Anyway, you can find something about it in the forum: http://www.howtoforge.com/forums/search.php?searchid=128265 and there's also a tutorial about it on HowtoForge: http://www.howtoforge.com/linux_apache2_frontpage2002
I assume you've put up the configuration for this virtual host into DNS so other machines can resolve your FQDN to an ip address. Hence the reason for people to see it from entering the static address but not the domain name. If you do a lookup of www.dansaycool.co.uk what gets returned?