I *kind of* understand how to host multiple websites on the same server, but I still have a few questions that maybe you guys can help me sort out. I know that I put NameVirtualHost * <VirtualHost *> ServerName www.domain.tld ........ into a config file, but which file, and where at in that file? Also, for the document root, must I specify the file relative to the apache folder, or can I specify C:/...../index.html ? I think that's all for now. Please help me!
Well, the config. file in a *nix environment is httpd.conf for apache. It might be a tad different for windows based systems. I wouldn't know. The path will not be relative. It will need to be the full path.
So may I append the virtual host information to the end of that file? I also notice that at the end of this file it references a virtual host config file. Should the information go in there?
It is prexif/conf directory. Most unix and control panels install it on /usr/local/apache/conf/httpd.conf. You can paste your vhost on the very down side of the conf file. Restart the server after modifying the config.
I have tried again and again, following the advice already given, but I am still running into problems. When I paste NameVirtualHost * <VirtualHost *> ServerName johnsporch.serveftp.net ServerAlias johnsporch.* DocumentRoot "C:\Program Files\xampp\htdocs\" </VirtualHost> <VirtualHost *> ServerName 192.168.0.5 DocumentRoot "C:\Program Files\xampp\htdocs\reflection\" </VirtualHost> Code (markup): into the bottom of my httpd.conf file and restart the service, when I type in 192.168.0.5, I am taken to the other directory, and when I have a friend go to johnsporch.serveftp.net, he is taken to the same place. However, clicking on any link results in a server busy error. Help?
does johnsporch.serveftp.net resolve to the IP address (with or without port forwarding) Apache is listening off? ServerAlias johnsporch.* <- wrong syntax - use subdomain.domain.tld or *.domain.tld (wildcard always prepend the .domain.tld) Using * is a lazy way to learn virtual hosting with Apache. once more, read through httpd.apache.org/docs/2.2/vhosts/