LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   redhat 7.3 apache virtual hosts (https://www.linuxquestions.org/questions/linux-newbie-8/redhat-7-3-apache-virtual-hosts-147549/)

dienerk 02-18-2004 07:12 AM

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!)

_KDF 02-18-2004 07:38 AM

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.

dienerk 02-18-2004 07:49 AM

I just want to host 8 different sites using the same IP number.

dienerk 02-18-2004 07:51 AM

These are different .com's and .biz sites (maybe I failed to mention that)

_KDF 02-18-2004 07:55 AM

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..

_KDF 02-18-2004 07:57 AM

NameVirtualHost 123.123.123.123
<VirtualHost 123.123.123.123>
ServerName www.yourdomain.com
ServerPath /pathtoserver
DocumentRoot /pathto/webfiles/
</VirtualHost>

dienerk 02-18-2004 08:00 AM

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!

dienerk 02-18-2004 08:03 AM

Thank you for the example, I have tried something similar in an example I found last night, but still got default page.

dienerk 02-18-2004 08:06 AM

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

_KDF 02-18-2004 08:09 AM

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)

dienerk 02-19-2004 09:51 AM

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.

elhombre 02-19-2004 10:01 AM

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.

fragglehorn 02-19-2004 12:49 PM

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.

dienerk 02-20-2004 12:18 AM

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.

fragglehorn 02-20-2004 09:51 AM

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.