logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache, Tomcat and MySQL
Author
podibuhaa



Joined: 01 Nov 2006
Posts: 2

PostPosted: Wed 01 Nov '06 20:29    Post subject: Apache, Tomcat and MySQL Reply with quote

Hello!

I have been struggling with this setup and would appreciate any input:

I have installed Apache 2.2.3, Tomcat 5.5 and MySql 5.0. Apache is setup to communicate with Tomcat using the AJP module and ConnectorJ is used to connect Tomcat and MySQL.

The httpd.conf setup for the virtual host looks like this:
<VirtualHost *:80>
DocumentRoot d:\rrc
ErrorLog logs/rrc-error_log
CustomLog logs/rrc-access_log common

DirectoryIndex index.html
#DO NOT ALLOW THE DISPLAY OF DIRECTORY CONTENTS
<Directory "d:\rrc">
Options indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>

ProxyPass /rrc ajp://localhost:8080/rrc
</VirtualHost>

I can view the jsp pages without the database access using this configuration. As soon as I view a jsp page with database access, it spits out code on the browser.

If I access any jsp including the ones with database access using the tomcat server on port 8080 directly, I can view them successfully.

Am I missing a step where I have to configure Apache with MySQL?

Thank you!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 02 Nov '06 13:30    Post subject: Reply with quote

Quote:

Am I missing a step where I have to configure Apache with MySQL?


MySQL is a server itself. You don't have to configure that in Apache configs.

If MySQL is running, you can use it in your scripts.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Thu 02 Nov '06 14:26    Post subject: Reply with quote

James Blond wrote:

If MySQL is running, you can use it in your scripts.


This taken that MySQL is setup correctly Mr. Green
Back to top
podibuhaa



Joined: 01 Nov 2006
Posts: 2

PostPosted: Fri 03 Nov '06 0:58    Post subject: Reply with quote

I know that MySQL is running and the jsp's can access the database because I can use the jsp's with data access when run directly on port 8080. But, when I try to use these pages through the connector from Apache to Tomcat is when this fails.
Back to top


Reply to topic   Topic: Apache, Tomcat and MySQL View previous topic :: View next topic
Post new topic   Forum Index -> Apache