Getting apache to talk to Tomcat

I am trying to get apache to talk to tomcat and when I am compiling the mod_jk.so (Jakarta connectors kit) i am getting a few errors when i run make. I was hoping you can point me in the right direction to get the mod_jk.so binaries so that i can get apache to serve my JSP's. I already tried to uncomment the line in the httpd.conf to include tomcat and renamed the server.xml file. So at this point I am a little stuck.
Here are the make errors:
# make
Making all in common
make[1]: Entering directory `/usr/apache/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/apache/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
Making all in apache-2.0
make[1]: Entering directory `/usr/apache/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/apache-2.0'
/bin/bash /var/apache2/build/libtool silent mode=compile /opt/SUNWspro/bin/cc -I/usr/apache2/include -g -O2 -DUSE_APACHE_MD5 -I ../common -I /include -I /include/unix -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -xO3 -xarch=v8 -xspace -W0,-Lt -W2,-Rcond_elim -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE -DHAVE_APR -I/usr/share/src/apache2/srclib/apr/include -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -c mod_jk.c
/var/apache2/build/libtool: line 862: /opt/SUNWspro/bin/cc: No such file or directory
make[1]: *** [mod_jk.lo] Error 1
make[1]: Leaving directory `/usr/apache/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/apache-2.0'
make: *** [all-recursive] Error 1
If i am going about this in the wrong way and this is already configured, can you tell me what you did to get it to work.
Thanks,
Brian

Here is the solution:
Use this fix to correct the build problems:
1.http://forum.sun.com/thread.jspa?threadID=21555&messageID=67120
2. make sure you have $JAVA_HOME in your .profile (or other login profile file)
3. re-compile apache,
4. install tomcat fresh with the axps switch
5. compile and install the tomcat connectors
6. modify your httpd.conf file, add the LoadModule lines right before section 2: (here they are)
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
7. right before section 3 of the httpd.conf add the JMount switches (this will serv JSP's from the website root dir)
JkWorkersFile "/usr/local/apache/conf/workers.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel error
JkMount /*.jsp default
JkMount /examples/* default
8. modify the server.xml file at the bottom (between the </Host> and </Engine> tag)below is the example :
</Host>
<Host name="www.yourdomain.com" debug="0"
appBase="/usr/local/apache/htdocs" >
<Context path="" docBase="" debug="0"/>
</Host>
</Engine>
</Service>
</Server>
9. after you test it add in any custom directory configs you want. make sure that you edit the server.xml and httpd.conf to chage the documentroot of each.
10. done

Similar Messages

  • Can't get Apache mod_jk To Work In Mountain Lion

    Hi,
    I'm trying to get Apache and Tomcat to communicate via mod_jk. I have had this working fine in the past on servers running 10.4 through 10.6.
    Now whenever I try to load the mod_jk module with 'JKMount /appname/* ajp13' in my virtual hosts file Apache barfs at startup with the unhelpful message...
    [Fri Jan 18 11:00:28 2013] [notice] Apache/2.2.22 (Unix) DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
    [Fri Jan 18 11:00:32 2013] [notice] caught SIGTERM, shutting down
    Everything else in my config is taken directly from a setup that works under Snow Leopard and I have (after much pain and grief) compiled and installed the latest version of mod_jk under Mountain Lion.
    Has anyone got mod_jk working under Mountain Lion? Is there a better forum for this question...
    cheers

    OK, it seems that mod_jk isn't getting loaded by Apache and I can't figure out why. No error messages or anything?

  • Apache HTTP server and Tomcat integration using mod_jk

    Hi, I'm trying to get Apache version 2 Server running with Tomcat 7 as the Java Servlet container (I'll be using Solr as the webapp next). Followed the instructions in the wiki articles Tomcat and Apache and Tomcat.
    The applications work fine separately. It's only when I modify the httpd.conf files as instructed that I get this error when I restart httpd and tomcat. This problem seems identical to this topic although the user that posted it does't know how he fixed the problem.
    Terminal wrote::: Starting Apache Web Server                                                                        [BUSY]
                               /usr/sbin/apachectl: line 84:  8640 Bus error               $HTTPD -k $ARGV       [FAIL]
    The only bit that I didn't follow to the letter is the part where it says to set TOMCAT_JAVA_HOME=/opt/java \. I have it as
    TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk. No idea why it repeats that the java home is in the /opt directory.
    I installed mod_jk from the AUR version 1.2.37-1.
    Any idea what the problem is?

    download the binary version of TomCat from
    http://jakarta.apache.org/
    and install it. but your need to set the environment variable...pls refer to
    http://www.amazon.com/exec/obidos/tg/stores/detail/-/books/1861002092/reader/18/ref=lib_dp_TT01/103-9996294-0061449#reader-link
    JSP hava some similarity of ASP. ASP is using Personal Web Server.
    heng

  • Help: Apache 2.0.36 / Tomcat 4.0.3 / mod_jk.dll

    I've been trying unsuccessfully to get Apache and Tomcat to work together on Windows 2000. I've seen various different sets of instructions for accomplishing this, but none of them have worked for me. I always end up unable to start Apache due to its inability to load the mod_jk module (even though it correctly states the full path to the module).
    1. Can anyone point me to a recent and/or correct set of instructions to set this up?
    2. Some instructions claim that Tomcat can generate a mod_jk configuration file, but I haven't found how to do that. How do you generate it?
    3. Any gotchas I should look out for?
    Thanks,
    Vince

    I had already tried that set of instructions and it didn't work for me either.
    But I did find out the source of the problem. It's a bug in Apache 2.0.x (up to the current 2.0.39). It has a problem parsing the path of the include (or add module) and can't find the mod_jk.dll.
    So I reverted back to Apache 1.3.26 and it's working. I'll keep checking for the next production-ready build of Apache 2 and try again.
    Thanks,
    Vince

  • Can't get Apache to work using WAMP or XAMPP

    My system:
    iMAC
    Mac OS X: Version 10.5.6
    Processor: 2.16 GHZ Intel Core 2 Duo
    Memory 2 GB 667 MHz DDR2 SDRAM
    I have over 75 Gigs available on my Mac HD and nearly 40 Gigs left on my external HD used for Time Machine
    Hello! I cannot get Apache to start after loading up WAMP (I also tried using XAMPP, but with the same result). This is driving me crazy. I am starting to build my first Joomla site and I have Joomla succesfully loaded onto my server site, but because of the Apache issue, I can't load Joomla onto my local server.
    This is what is going on:
    have successfully loaded MAMP and MAMPro. This is a fresh reload as of today. When I go to start the MAMP, I get the following message with regards to Apache:
    (28)No space left on device: mod_rewrite: could not create rewriteloglock
    * Edit post
    * Report this post
    * Reply with quote
    I found this page on the web:
    http://www.ehow.com/how4397601error-n ... evice.html
    I got brave and went into the root using terminal.app. After following the instructions on that page as best I could, there did seem to be a lot of semapores (maybe 50+), but how to delete them was unclear to me on that page. I tried to follow Step 2 by copying this line and pasting it into the terminal prompt:
    ipcs -s # grep apache # perl -e ‘while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}’
    but it was pretty unclear if I was doing it correctly and there seemed to be no real result. I got too nervous working in terminal to try to continue the instructions on how to delete them, so I got out of terminal and decided to see if there was anything else that might help.
    After being in there, I tried to run Apache from MAMP, and, once again, I got the same error. I then found this site:
    http://www.devarticles.com/c/a/Apache/U ... -Mac-OS-X/
    I did type in "localhost" in the browser, and it DID show apache running with the confirmation window looking exactly as in the article. I then follow the instructions back to terminal.app and did the following command:
    sudo pico http.conf
    just as in the article, I found these four lines shown exactly like this:
    #LoadModule php4_module
    #AddModule mod_php4.c
    #AddType application/x-httpd-php .php
    #AddType application/x-httpd-php-source .phps
    however, there were so many warnings about making and changes and such that I decided NOT to eliminate the # sign as the article recommended and just got out of terminal.
    The thing is this. Under MAMP, everything seems to be running EXCEPT Apache. However, when I type "localhost" in the command line of my foxfire browser, Apache seems to be running fine.
    On another forum, where I have posted exactly as above, the response was:
    I cannot reproduce this behaviour even though i have the same osx version and hardware configuration. But I found this site, it may help you to solve the problem:
    http://carlosrivero.com/fix-apache---no-space-left-on-device-couldnt-create-acce pt-lock
    The script you've used is not correct, the # symbols have to be replaced with pipes | to execute the commands one after another. You should execute this as admin using "sudo" followed by the commands. You also have to replace "apache" with the user name under which apache is currently running. For MAMP Pro that is either "www" or your user name:
    This will list all active semaphores of the user "www"
    Code: Select all
    sudo ipcs -s | grep www
    This one should remove them (at least it one runs without any errors)
    I tried this but I'm afraid that I am still having the exact same problem. In fact, I unloaded MAMP and then tried XAMPP, which also didn't work. I tried to follow the directions above, but I'm so unfamiliar with how to do terminal in Mac, that I'm really not sure that I'm doing things correctly, or that I'm even addressing the problem. I have Joomla uploaded and ready to go on my server site (godaddy.com), but I really wanted to use my localhost to build the site offline.
    I've tried uploading joomla to MAMP as it exists, but when I go back to my browser with http://localhost/
    I still just get the apache confirmation page - no Joomla. Maybe part of the problem is that I'm still not completely clear on how to execute the instructions as above had them in terminal. I don't get what they meant by code: SELECT ALL.
    I don't know what they mean when they say, "You should execute this as admin using "sudo" followed by the commands. You also have to replace "apache" with the user name under which apache is currently running. For MAMP Pro that is either "www" or your user name:"
    how do I know what the username is for apache? How do I know what my username is? I know that these are basic questions, but I have never had to do this before and I don't know where to find the answers. I simply copied and pasted into terminal EXACTLY what it was posted. It really didn't seem to do anything.
    Oh, and right now, as I write this, if I click on
    Open start page
    from MAMP, a browser window opens with the following:
    Failed to Connect
    Firefox can't establish a connection to the server at localhost:8888.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.
    So, I'm at a loss of what to do next. I can work on joomla through godaddy, but I would prefer to work on my localhost. I am very discouraged that I am hung up at such as basic level and can't get started. I do have Mac ProCare, but the Mac store is quite a ways away, and I'm not sure how they could help solve this problem.
    Please lead me through a solution to this.

    Ok, first thing, why are you doing anything with WAMP or XAMPP when you're running a Mac? MAMP should be what you want unless you're not explaining part of what you are trying to do.
    2nd thing, I haven't used MAMP in a while, but there are two possibilities for not seeing what you want to see once you have MAMP turned on. One possibility is that you already have "Web Sharing" turned on in your Sharing Preference Pane. If that is the case, port 80 will already be taken and you'll be seeing the default Apache install (files are stored at /Library/WebServer/Documents/). This would push MAMP to either not turn on it's web serving capabilities, or to push it to another port. The other possibility is that MAMP defaults to another port anyway. So instead of localhost, you might have to type in localhost:8080 or something similar. I believe the control panel that gets installed can take you to the currently MAMP-served page, and it can also help you change which port your serving on.
    80 is the default port for web serving and the ONLY port that will let you get straight to the server without having to type in webaddress.com:port# instead of just webaddress.com.

  • How do I get Apache web server working ...

    How do I get Apache web server working on my MacBook Pro, which is running Leopard 10.5.8?
    When I enter 'http://localhost/~username/' (without the quote marks) as a URL in my Firefox browser on the MacBook, I do not see any result at all(!). I do have Web Sharing on in System Preferences on that machine. But the browser does nothing whatever for that URL ...
    On my other computer, an iMac running Leopard 10.5.8, when I enter 'http://localhost/~username/' I see the default "Your Website Here" page. That same default page is in fact the index.html file I expect to see on the MacBook Pro. But it isn't getting invoked for some reason. Nothing is happening ...
    When on the iMac I try 'http://10.0.1.18/~username/' (10.0.1.18 is the local IP address I see under 'Web Sharing: On' on the MacBook) I get "Unable to connect: Firefox can't establish a connection to the server at 10.0.1.18."
    When on the MacBook I try 'http://10.0.1.5/~username/' (10.0.1.5 is the local IP address I see under 'Web Sharing: On' on the MacBook) I see the default "Your Website Here" page.
    It is the same on my iPhone: Using the same local IP addresses and usernames, Safari can see the index.html page on my iMac but not on my MacBook.
    It looks as if Apache is not working on the MacBook, while on the iMac it works fine.
    On the MacBook I can see (after I use 'defaults write com.apple.finder AppleShowAllFiles TRUE' in Terminal) a /private/etc/apache2/ directory with what look to be(?) the usual contents. So it looks like Apache is duly installed, as far as I can tell.
    On the MacBook I don't see a file at /private/var/log/apache2/error_log, which is the location for 'ErrorLog' given in the httpd.conf file.
    That about exhausts my understanding of how to get a handle on my problem.
    Any advice or suggestions from those who have more expertise with Apache will be much appreciated ...

    Okai, so we are getting somewhere, but not quit there yet :-)
    I opened the Kenneth.conf file using the command: vi Kenneth.conf
    This is what it said:
    <Directory "/Users/Kenneth/Sites/">
    Options Indexes Multiviews
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    </Directory>
    "Kenneth.conf" [readonly] 6L, 139C
    I therefore changed the AllowOverride from AuthConfig Limit to None, which was the only difference from what you posted above. Something did change, when I tried to open XAMPP it prompted me a password, but Apache still wont start :-/

  • How to get the black, talking bar to go away

    how do I get the black, talking bar to go away and how do I refresh?  Thanks

    Welcome to Apple Support Communities
    That's VoiceOver. To disable VoiceOver, press Command and F5 keys, or open System Preferences > Accessibility > VoiceOver, and disable VoiceOver

  • Can't get apache to parse xml pages

    have installed xmlbean cocoon jdk and still can't get apache to parse the xml pages please help...does any one have a win32 compiled mod_xml?

    Ok, first thing, why are you doing anything with WAMP or XAMPP when you're running a Mac? MAMP should be what you want unless you're not explaining part of what you are trying to do.
    2nd thing, I haven't used MAMP in a while, but there are two possibilities for not seeing what you want to see once you have MAMP turned on. One possibility is that you already have "Web Sharing" turned on in your Sharing Preference Pane. If that is the case, port 80 will already be taken and you'll be seeing the default Apache install (files are stored at /Library/WebServer/Documents/). This would push MAMP to either not turn on it's web serving capabilities, or to push it to another port. The other possibility is that MAMP defaults to another port anyway. So instead of localhost, you might have to type in localhost:8080 or something similar. I believe the control panel that gets installed can take you to the currently MAMP-served page, and it can also help you change which port your serving on.
    80 is the default port for web serving and the ONLY port that will let you get straight to the server without having to type in webaddress.com:port# instead of just webaddress.com.

  • REGZA LINK RD88TKTB & 32RAV635DB how to get them to talk ?

    I just bought RD88TKTB HDD HDMI recorder & 32RAV635DB 1080p TV and they both boast REGZA link. I have looked in the manuals and online and can't seem to find how to get them to talk to each other.
    HDMI cable is connected and in view mode 1080p.
    From what i'm reading one remote should work both but it don't so far. Is there an option somewhere in one or other of the menus to click on tick on ?
    Any help ?
    Cheers Eric

    Hello mate
    This is a computer/notebook forum and I doubt there are many people who have the same issue like you.
    Anyway, I found some info:
    The REGZA Link uses CONSUMER ELECTRONICS CONTROL (CEC) protocol.
    I assume both devices needs to support CEC in order to control both devices using one remote control.
    As far as I know if both devices supports REGZA Link then in both devices should be a option for enabling or disabling this option.
    So check if both devices have enabled REGZA Link.
    Sorry but I think all user manuals should contain info about supported option
    If user manual does not mention anything about REGZA Link then it could be possible that this feature is not supported by an device.

  • Install Apach web server and Tomcat

    Is it possible to install Apach web server and Tomcat into Oracle Application Server?
    If possible, which way is the best? People said that I would better install Apach web server and Tomcat in Redhat.
    If you know the answer, would you mind give me the answer or document link?
    Thanks

    Tomcat is just a servlet engine. Oracle Application Server already includes a servlet engine. Apache is a default component too.

  • Trying to get Apache, PHP and MySQL up and running

    I have just bought a new MacBook and I want to set up Apache, PHP and MySQL in order to create a local mirror of a website I have in my 'Sites' folder.
    I fall at the first fence!! To get Apache, I switch web sharing on in System Preferences' and I get the green light. When I click the links for personal website or computer's website I get a "Safari can't connect to the server" message.
    Any ideas what I should do now?

    Stephen Dancer wrote:
    Any ideas what I should do now?
    You will need to make some change to the index file in your Sites directory in order to enable Apache for that directory.
    You will have to enable PHP in the Apache config file at /etc/apache2/httpd.conf
    For MySQL, you will have to install it, and then fix it. You'll want to remove the StartupItem it wants to use and replace it with a launchd file. This discussion has a good roundup of the very latest tricks to get MySQL up and running with the latest security updates.

  • My iphone 4s getting overhear while talking or playing games

    iphone 4s getting overheat while talking or playing games

    iPhone heats because of using 3g "internet" or in the sun light

  • The tab is bad with apache web server and tomcat

    the tab not run with apache web server + tomcat.
    It is very bad..

    Fijate que solo he estado experimentando con JSC, no he tenido oportunidad de poner nada en producci�n usando la combinaci�n Apache Web Server y Tomcat JSP container y no cuento en �ste momento con �sta configuraci�n para probar.
    Nosotros (en donde trabajo) usamos IBM Web Server (basado en Apache Web Server 2), IBM Websphere 6 y las aplicaciones JSF en producci�n est�n hechas con Rational Web Developer.
    Ahora he estado muy ocupado con un proyecto urgente, si tengo alg�n tiempo libre la semana entrante tratar� de probar tu combinaci�n (no te prometo nada) pero para ello necesito que me digas las versiones que est�s usando de Apache Web Server y de Tomcat, como est�s enlazando entre ambos con un m�dulo o con ProxyPass y mejor si me mandas el httpd.conf.
    Saludos.

  • Apache web server/jakarta tomcat

    Hey guys!
    here's the fact, i installed jakarta-tomcat and apache web server, but i don't know how to integrate them, i mean, I just want to have one http server with the functionality to use servlets. Do I need only jakarta tomcat to have this?, please help me.
    and forgive my very poor english! :)

    Hallo.
    Create or edit the file %APACHE_HOME%/conf/worker.properties
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    Edit the file %APACHE_HOME%/conf/httpd.conf
    LoadModule jk_module modules/mod_jk.dll
    AddModule mod_jk.c
    JkWorkersFile "%APACHE_HOME%/conf/worker.properties"
    JkLogFile "APACHE_HOME%/logs/mod_jk.log"
    JkLogLevel debug
    Alias /myWebApp "%TOMCAT_HOME%/webapps/myWebApp"
    JkMount /myWebApp/*.jsp testWorker
    Check the file mod_jk.dll in the folder %APACHE_HOME%/modules/. Howevere there are different libraries for different versions of Apache Web Aerver and Tomcat.
    Edit the file %TOMCAT_HOME%/conf/server.xml
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8009" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="20000"
    useURIValidationHack="false"
    protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
    Good luck.

  • Get username via servlet from Tomcat session

    I have a servlet that uploads files. In order to distinguish files, I want to put the username,date, and time in the new filename (I already have the date and time). Can somebody point me to an example that will get the username from the tomcat session?
    thanks in advance,
    Chuk

    Assuming that the user has logged in to your web application through something like form-based authentication you can use:
    request.getUserPrincipal()to get hold of information about the user.
    However, if they've not logged in with your site then you'll get nothing back. Also, depending on the version of Tomcat you've got you may encounter some stupid behaviour (getting null back) if the Servlet isn't a protected resource.
    Failing that you can try getRemoteUser to try to obtain some information about the authenticated user; I've had some problems with this in the past with IIS and haven't tried it with Tomcat.
    If you want more information about how to get your user to authenticate against your web application realm then just ask...
    Hope this helps.

Maybe you are looking for

  • Create a structure type at runtime

    Hi friends, is it possible to create a local structure type dynamically(at run time).My situation is as follows : The user gives a period of time - for Example from "05.03.2009" to "04.03.2010" Depending on the number of months between the period of

  • HT4759 how do i create a new icloud account

    How do i get my Iphoto photo stream to get online - icloud account created but no connection from iphoto\

  • SQL optimization

    Hello, I am using Oracle 11.2, I have a very slow query on the following table: Create table tb_base (crt_dttm timestamp(6), extrl_id varchar2(12), extrl_addr varchar2(128)); Create index idx111_base on tb_base(crt_dttm); Create index idx222_base on

  • Processes - Which modules?

    Hi there, Please can someone explain to me the following, I would like to understand this fully: Which modules do the following processes fall under? ASN Container Scheduling Customs Delivery tracking Demands MRP

  • No suitable plugins were found when trying to install plugin for watching video

    When trying to watch videos on my web site (www.ruivilela.com), they won't play. I get a message that a plugin is needed. When I click on Install plugins, I get a message that no suitable plugins were found. I really don't know what to do because I c