That's all very nice aticles, but it doesn't help me now.
Let's make this an official one....
I use RH9 with Apache updated untill today. I already had one website, a php driven one with mysql integration. I do not run my own DNS, and I prefer not to, even. I simply applied for registration, gave them my IP, and it worked.
So, my website was fine, and a friend asked me if he could run his website on my server. That's when I posted this topic. I read the articles and it did not seem rocket science to me. I told him my IP and he transferred the name to my public IP with his registration service.
So, to make it easy for him, I made him a user account, and I started the http server config tool that came with redhat. I would have preferred to edit httpd.conf myself, but things got weird when I tried to vi httpd.conf, even when the server was stopped. It seems so contain no information, while I'm sure something should be there. Anyway.
I stopped the server, tested if the page was down, and started the config tool.
I told it to listen on all avilable addresses on port 80. I deleted the default virtual host, and made a new one for my own site, based on my old configuration. It is virtual host 0, name based,has a root directory /var/www/html/, IP set to my public IP, and www.hostname.dom
as host name. Also I told it to start up with index.php as the main page.
I restarted the web server and yes. My old site was up again.
So, I stopped the web server. I made a new name based virtual host (1). I gave it a root at /home/user/www/ looking for index.html , ip as my public IP, and www.anotherhost.dom
as host name. After starting the webserver, my own site was working.
But when I typed in the url of my friends page, I get mine. It will not look in to the right directory, because the only way I can see my friends site is when I take it all and put it in my var/www/html directory while explicitly giving the index.html, but that's all fairly logical.
Now, I really don't understand why it doesn't work... Please help!