dear colleagues, i am using linux cetos 5 and not really an expert understanding some linux configurations. ph5, mysql5, apache2 have been installed yesterday and now i am about to do some testing for my websites. what i would just like to achieve is to do "Virtual HTTP Server" (port 80)browsing, meaning i'll just set to the router the IP address of my linux machine (e.g. 192.168.102.10) and then access it to another computer by simply typing http://192.168.102.10 to the browser to view my webpage. i am able to do this in a windows xp machine but not in linux. i've searched the web about this problem, and here's what i have done so far: - i edited httpd.conf file and added the following lines at the bottom: NameVirtualHost 192.168.102.10 <VirtualHost 192.168.102.10> DocumentRoot /var/www/virtual/mywebfolder ServerName test </VirtualHost> - saved httpd.conf file then restarted apache i also tried httpd -S and it's telling me syntax OK and doesn't give me an error. i really had a hard time finding what's the problem. i would really appreciate any help that you could give. thanks in advance. regards, - hayunna
I'm not sure it will work, but ServerName should be your domain:80 I think? test only is definitely not a valid domain name. Else, you could try leaving away the ServerName directive. Also, try putting :80 behind the IP's, maybe that works better (even though it should work like it currently is -not thinking about the ServerName directive-.
you should set port when start virtual host NameVirtualHost 192.168.102.10:80 or NameVirtualHost *:80 did you check error_log ?