Skip to end of metadata
Go to start of metadata

オリジナル: Apache frontend for security

It is possible to use an apache in front of your tomcat instance that runs Hudson. You will need to compile apache-2.2 with mod_proxy enabled. The example below shows an invocation of apache-2.2 configure script with parameters that enable mod_proxy, mod_proxy_ajp, LDAP and SSL.

[ root@buildhost# ]sudo ./configure --enable-proxy \
--enable-ldap \
--enable-vhost \
--enable-ssl \
--enable-suexec \
--enable-rewrite \
--enable-proxy-ajp \
--enable-authnz-ldap \
--enable-mods-shared=all \
--with-ssl \
--with-ldap \
--with-ldap-include=/usr/include/ \

Edit the httpd-vhosts.conf file that resides in \${APACHE_HOME}/conf/extras to make apache aware of your tomcat server. The example below shows a vhost configuration for an apache that runs on the same machine as the tomcat instance. The tomcat instance here is configured to run an AJP connector on port 8102. It has no HTTP* connectors configured. This vhost is also configured to rely on basic authentication (htpasswd) to protect certain resources, such as project(s) configuration, hudon management, and project(s) deletion. See the apache manual for examples of basic, and other, authentication scheme configuration.

<VirtualHost *:80>
    DocumentRoot "/opt/apache/httpd/htdocs"
    ErrorLog "logs/hudson-error_log"

           ProxyPass /hudson/ ajp://
           ProxyPassReverse /hudson/ ajp://
           ProxyPass / ajp://
           ProxyPassReverse / ajp://
        <Location />
                Order allow,deny
                Allow from all
        <Location /hudson/manage>
                AuthType basic
                AuthName "Hudson Config"
                AuthUserFile "/opt/apache/httpd/conf/.htpasswd"
                Require valid-user
        <LocationMatch "/hudson/job/.*/configure">
                AuthType basic
                AuthName "Hudson Project Config"
                AuthUserFile "/opt/apache/httpd/conf/.htpasswd"
                Require valid-user
        <LocationMatch "/hudson/job/.*/delete">
                AuthType basic
                AuthName "Hudson Project Config"
                AuthUserFile "/opt/apache/httpd/conf/.htpasswd"
                Require valid-user
[_Top of page_|#top]


The tomcat instance does not have an HTTP connector to prevent direct access. I am currently trying to find out how to get the AJP connector only listen/accept communications on a certain interface. Until that is done, a rogue apache server can be configured to access your tomcat instance and bypass all authentication.

This is done by setting the address attribute in the tomcat connector definition. See For above localhost setting, use address="". Without this, Tomcat will listen on all interfaces, including all external-facing interfaces. With the setting, Tomcat will make the connector listen just on to which no packets from external sources will be routed.

  • No labels


  1. Anonymous Buy Fioricet Online
    [||Buy Fioricet]

  2. Anonymous

    I always cut out interesting article,cheap jordans .

  3. Anonymous

    I really want to say your article is very good! Support you,fake tian louboutin.

  4. Anonymous

    Bless your friend forever! Also bless myself! coach bags

  5. Anonymous

    There was a song in the first season,coach outlet joke and then we decided to go to Hawaii with my kids.

  6. Anonymous

    supra skytop I like your your beauty! Perhaps you don; t think too much of it, bu it is really fascinating.

  7. Anonymous

    When you can feel the things you,coach shoes want to feel able to say what you feel when this is a very happy time.

  8. Anonymous

    Truth is God and God is truth. christian louboutin

  9. Anonymous

    Not tolerance of others, is unworthy of tolerance by others,louis vuitton outlet but who can say oneself is not to need tolerant?

  10. Anonymous

    Thank you for your explanation. Very helpful.
    Air Jordan

  11. Anonymous

    coach factory stores. I like all of your article.Well done..*