redhat 7.3 apache virtual hosts
I am trying to setup virtual hosts using apache in redhat 7.3. All I ever get is the default page. I have read the apache documentation and everything I try still doesn't work. Is there something else that will walk me through it in "see spot run" language? I need to host about 8 web sites. PLEASE Help.
Thanx (I may have posted in wrong section earlier, NEWBIE!) |
Are you using virtual hosts by domain ? eg something.somwhere.com goes to one site something2.somewhere.com goes somewhere else.
All you need to do is specify your virtual hosts in the httpd.conf file. |
I just want to host 8 different sites using the same IP number.
|
These are different .com's and .biz sites (maybe I failed to mention that)
|
as long as you specify them in your conf file it should work no problem, hold on I will try to paste an example from my conf file..
|
NameVirtualHost 123.123.123.123
<VirtualHost 123.123.123.123> ServerName www.yourdomain.com ServerPath /pathtoserver DocumentRoot /pathto/webfiles/ </VirtualHost> |
I have tried to edit conf file in the past and it never works for me. I continue to get default page. An example would be great!
|
Thank you for the example, I have tried something similar in an example I found last night, but still got default page.
|
Thanx for the help, I guess I will try it again and let you know. I must have followed the example incorrectly. I will use your example and try. I will post reply to let you know if I stil cannot get it.
Much Thanx |
make sure you restart apache after any changes to the conf file.
# /usr/sbin/apachectl restart (your apache restart command may vary between distro's) |
So what am I not getting! I still only get the default page. I am reading everything I can find and trying everything I read, as much as I can anyway, but still get the default page. I don't want to give up but I am starting to get frustrated to the point of going back to a windows based server. I even installed webmin and keep getting the default page. If someone can help, please do.
|
i had the same problem when i first started setting up VD in rh8. i got some help from a buddy and we still couldn't get it fixed. i ended up having to start over with the original httpd.conf and did it all by command line. no more making changes in the GUI for me. :tisk: i also assigned an IP to my rh8 system to minimize confusion in the conf file. before i had it obtaining ips automatically. not sure if that was a problem but a few other linux users recommended i do that. good luck.
|
dienerk,
How about if some fresh eyes could see your httpd.conf file? It might be something relatively easy that you're missing after staring at it for so long. |
Maybe this will help, let me know if there is more of the file that you need.
NameVirtualHost 12.345.678.912 <VirtualHost 12.345.678.912:*> DocumentRoot /var/www/html/diener.us ServerName diener.us DirectoryIndex index.htm index.html </VirtualHost> Thanx for the help. |
This might not be terribly important, but there's no need to specify a port following your ip address. You could try this:
<VirtualHost 12.345.678.912> or even this: NameVirtualHost * <VirtualHost *> |
All times are GMT -5. The time now is 12:55 PM. |