LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-23-2004, 06:29 PM   #1
jglazner
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Rep: Reputation: 0
Apache2 virtualHost config problem


Once upon a time about 2 weeks ago the vhosts worked fine. But that was when i had apache 2.0.40 installed from the rpm that i got by using apt-get (apt-get install httpd). Then i wanted to configure Apache Tomcat and using mod_jk to connect apache and tomcat. I tried for a week strait to get them to work but couldn't, so in frustration i removed httpd and followed an awesome tuturial on setting up apache and tomcat:

for anyone looking to do that i suggest:
http://johnturner.com/howto/apache2-...rh9-howto.html

NOW, I got everything up and got all of the test pages and mod_jk working and everything. However when i copied the virtual host info from my old httpd.conf file i get an interesting problem. they all point to the default webiste which is located at /web/apps/ROOT but the directives are pointing them to /web/apps/glaznerfamily/ROOT , /web/apps/industrial_design/ROOT and /web/apps/designers_coalition/ROOT. you can see the problem first hand if you go to

http://www.coldcrow.com (default site)
http://www.glaznerfamily.com (second site)
http://www.dcasu.org (third site)
http://www.unspokenbalance.com (fourth site)


httpd.conf

NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerAdmin webmaster@coldcrow.com
DocumentRoot /web/apps/ROOT
ServerName www.coldcrow.com
ServerAlias www.coldcrow.com
ErrorLog logs/coldcrow.com-error_log
ScriptAlias /cgi-bin/ "/web/apps/ROOT/cgi-bin/"
<Directory "/web/apps/ROOT/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@glaznerfamily.com
DocumentRoot /web/apps/glaznerfamily/ROOT
ServerName www.glaznerfamily.com
ServerAlias www.glaznerfamily.com
ErrorLog logs/glaznerfamily.com-error_log
ScriptAlias /cgi-bin/ "/web/apps/glaznerfamily/ROOT/cgi-bin/"
<Directory "/web/apps/glaznerfamily/ROOT/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@dcasu.org
DocumentRoot /web/apps/designers_coalition/ROOT
ServerName www.dcasu.org
ServerAlias www.dcasu.org
ErrorLog logs/dcasu.org-error_log
ScriptAlias /cgi-bin/ "/web/apps/designers_coalition/ROOT/cgi-bin/"
<Directory "/web/apps/designers_coalition/ROOT/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@unspokenbalance.com
DocumentRoot /web/apps/industrial_design/ROOT
ServerName www.unspokenbalance.com
ServerAlias www.unspokenbalance.com
ErrorLog logs/unspokenbalance.com-error_log
ScriptAlias /cgi-bin/ "/web/apps/industrial_design/ROOT/cgi-bin/"
<Directory "/web/apps/industrial_design/ROOT/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

Include /usr/local/tomcat/conf/auto/mod_jk.conf

End httpd.conf

I did a config test and got "Syntax OK".
then i tried httpd -S and got the following:

208.187.207.30:80 coldcrow.com (/usr/local/tomcat/conf/auto/mod_jk.conf:14)
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server www.coldcrow.com (/usr/local/apache/conf/httpd.conf:1035)
port 80 namevhost www.coldcrow.com (/usr/local/apache/conf/httpd.conf:1035)
port 80 namevhost www.glaznerfamily.com (/usr/local/apache/conf/httpd.conf:1051)
port 80 namevhost www.dcasu.org (/usr/local/apache/conf/httpd.conf:1067)
port 80 namevhost www.unspokenbalance.com (/usr/local/apache/conf/httpd.conf:1083)
Syntax OK

any help would be appreciated.
 
Old 03-31-2004, 11:17 AM   #2
jglazner
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Unhappy STILL HAVING THIS PROBLEM

I'm really stuck here. I'm completely at a loss here. I don't kow what to do. Does anyone have any ideas? I have tried doing everyghing possible. I have searched this forum for similar problems and tried the solutions offered there but nothing. PLEASE HELP!!! SOMEONE ANYONE
 
Old 03-31-2004, 11:57 PM   #3
jglazner
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
some progress at least

Ok well i found the problem but now i don't know how to fix it. the problem is the include mod_jk.conf directive at the bottom. If i uncomment that out then i get proper redirection. I set up hosts directives in the tomcat server.xml file and now when i start apache i get this message:

VirtualHost coldcrow.com:80 overlpas with VirtualHost glaznerfamily.com:80, the first has precedence, perhaps you need a NameVirtualHost directive

any ideas??? so far i have found nothing.
 
Old 04-01-2004, 02:22 AM   #4
jglazner
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Talking problem solved

Well i finally got it fixed. After consulting lots and lots of documentation on jakarta-tomcat's website i decided to move away from the older mod_jk and go with mod_jk2 which is better suited for Apache 2.0 They have a pretty good how to here:

http://jakarta.apache.org/tomcat/tom...hosthowto.html

OH so yeah anyway it was the Include directive that caused the problem. after installing mod_jk2 (which if you are using the rpm based httpd you need to get httpd-devel to compile mod_jk2.so) and adding the sites to the workers2.properties file and in the virtual host directives it worked out fine.

If anyone ever decides to read this i am now some what of an expert on it (thanks to hours and hours of reading badly written howto's) i could probably help you. jglazner-AT-creditback-DOT-com

Last edited by jglazner; 04-01-2004 at 02:25 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 Config Help - No Idea YaAqoB Linux - Software 2 08-17-2005 02:47 AM
where is the apache2 config file dev_mohamed Linux - Software 2 06-20-2005 08:21 PM
Can't config mod_deflate on apache2 joeyta Linux - Software 2 02-18-2005 03:58 PM
Apache2 SSL Config problem Xixulon Linux - Software 1 10-19-2004 04:11 PM
Apache2 config errors.. SiGmA_X Linux - Software 0 06-17-2003 02:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration