Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.0 Virtual Web pages

Status
Not open for further replies.

charleshagen

IS-IT--Management
Jan 4, 2003
73
0
0
US
Just went to Apache 2.0 on a new RedHat 9.0 server. I used the tools that came with the Xwindow/Gnome load to create virtual domains. Now the Apache test page is the only one that comes up. None of the virtual domains show up.

I seem to be hitting a mind block as to why.

Need help FAST on this.

Charles Hagen
 
1st did you restart apache? 2nd are the documentroots correct for the virtual domains?
 
It would be easier if we could talk about it.

Please call me at 877-424-3648

Thanks,

Charles
 
In RH8, the default html page is in the /etc/httpd folder. Where did you install the domains, and where did you direct them to? I had this problem at first.

Newposter
"Good judgment comes from experience. Experience comes from bad judgment."
 
I restarted Apache (of course) with no joy.

No matter what I do it posts the test page.
 
Not sure is this helps ... it worked for me.
1) Make sure that you have commented out or removed the Globals for ServerName, DocumentRoot and DirectoryIndex.
Your VirtualHost directives will have them included.
2) Set your NameVirtualHost with appropriate
IP address:port
3) Include this IP address:port in your VirtualHost directive - <VirtualHost xxx.xxx.xx.xx:80> in ALL your VHOSTS, including the one you want to be your default - I did NOT use the * or _default_* (it didn't work for me)
4) Assign your ServerName
5) Assign your ServerAlias (NO port included)
6) Assign your DocumentRoot
7) Assign your DirectoryIndex
8) You can add others if you want ...
9) Close directive </VirtualHost>

Hope this helps.

tgb
 
BE ADVISED! The apache config tool in RedHat 9 DOES NOT WORK!

Use another editor and manually edit, or use Webmin Apache interface.
 
CharlesHagen,
I have it working ... but I can't use SSL.
I had to change the httpd.conf file where the Include conf.d/*.conf line was by commenting it out and replacing as follows:
Include conf.d/perl.conf
Include conf.d/php.conf
Include conf.d/auth_mysql.conf

Correction from earlier message:
Do not comment out the global DirectoryIndex line!

I am able to use the VirtualHost now with the Apache that came in with the RedHat 9 distro.

Granted, I almost gave up ...
Now, if I want to use SSL ... I have to think of over issues, since I will have to use seperate IPs for each VHOST.
 
Can't do SSL using with multiple VHosts using NameBasedVhosts.
I think you can do this only using IP based ... and each VHOST would have to use it's own IP address.
You are right, I don't think what I have described above would work for SSL ... that is why I said to not use the default Include statement (which included the SSL modules).
I will try configuring httpd.conf using SSL on my second PC ... but it won't have multiple VHOSTS.

tgb
 
I just had this problem:

Enable this in your httpd.conf file and use the IP address.

NameVirtualHost x.x.x.x

<VirtualHost x.x.x.x>
DocumentRoot &quot;/Volume2m/Websites/site1&quot;
ServerName site1.com
ServerAlias LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %>s %b \&quot;%{Referer}i\&quot; \&quot;%{User-agent}i\&quot;&quot; comonvhost
CustomLog /Volume2m/Websites/Logfiles/site1.com/access_log comonvhost
</VirtualHost>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top