Wednesday, January 4, 2012

Running Artifactory with Tomcat behind Apache HTTPD

At work we're setting up some new Artifactory instances in the AWS cloud, using all the latest gizmos - Ubuntu 11, Java 7, a dedicated Tomcat instance as the Web container and MySQL as the data store. We wanted to run Tomcat behind Apache HTTPD as the default application; this took a few tries before we got it right, so I'm posting the details here as I didn't find many results when Googling.

The following assumes you're using a dedicated Tomcat instance to run Artifactory and that you've used their $ARTIFACTORY_HOME/bin/tomcat-install.sh script to do a standard installation, so that Artifactory is listening on http://yourhost.yourdomain:8081/artifactory, with an AJP listener on port 8019.

Install mod_proxy_ajp:

sudo a2enmod proxy_ajp

Set up the Apache site configuration to proxy requests to Artifactory - default config file under Ubuntu is /etc/apache2/sites-enabled/000-default

ProxyPreserveHost on
ProxyPass / ajp://localhost:8019/artifactory/
ProxyPassReverse / http://yourhost.yourdomain/artifactory
ProxyPassReverseCookiePath /artifactory/ /

Add these lines just before the end of the VirtualHost section.

Restart Apache:

sudo service apache2 restart

Now Artifactory should respond on http://yourhost.yourdomain

Finally, go to the Admin tab in Artifactory, select General in the left toolbar and set the Custom URL Base field to http://yourhost.yourdomain

1 comment:

  1. IS THE GOSPEL DIFFICULT TO UNDERSTAND?

    The gospel plan salvation is not difficult to understand if you simply read it as God inspired it. Just read the Bible and believe it.

    The Scriptures only get hard to comprehend when men distort, pervert, and misrepresent the clear teachings of the Bible. Man's opinion can and does make if difficult for many to understand God's plan of salvation.

    IT IS NOT THAT DIFFICULT!

    Mark 16:16 Whoever believes and is baptized will be saved, but whoever does not believe will be condemned.

    1. Who believes will be saved.
    2. Who is baptized will be saved.
    3. Who does not believe will be condemned.

    It is not difficult to understand.

    John 8:24 I told you that you would die in your sins; if you do not believe that I am the one I claim to be, you will indeed die in your sins."

    1. If you do not believe Jesus is the Son of God you will die in your sins.

    There is nothing complicated about that statement.

    Acts 2:38 Peter replied, "Repent and be baptized, everyone of you, in the name of Jesus Christ so that your sins may be forgiven. And you will receive the gift of the Holy Spirit.

    1. Repent in order to have your sins forgiven.
    2. Be baptized in order to have your sins forgiven.
    3. After repentance and baptism you will receive the indwelling gift of the Holy Spirit Himself.

    There is nothing unfathomable presented here.

    Romans 10:9 That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

    1. You must acknowledge Jesus as Lord to be saved.
    2. You must believe in the resurrection of Jesus from the dead to be saved.

    Nothing mysterious about that.

    Galatians 3:26 You are sons of God through faith in Christ Jesus,

    1. Through faith in Christ Jesus you can become a son of God.

    Nothing troublesome in that statement.

    Galatians 3:27 for all of you who were baptized into Christ have clothed yourselves with Christ.

    1. Men become clothed with Christ by being baptized into Him.

    There is nothing confusing about that.

    Ephesians 2:8 For it is by grace you have been saved, through faith---and this not from from yourselves, it is a gift of God.

    1. We are saved because of God's grace. No man earns his salvation.
    2. We are saved through faith.
    3. The gift that God gives is salvation.

    There is nothing enigmatic found here.

    Acts 2:47 .....And the Lord added to their number daily those who were being saved.

    1. The Lord and only the Lord adds to His church.

    Nothing inexplicable in that.

    Acts 22:16 And now what are you waiting for? Get up, be baptized and wash your sins away, calling on his name.'

    1. Saul was still in his sins until he was baptized in water.

    You do not need a degree in theology to understand that.

    John 3:16 "For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.

    1. Whoever believes in Jesus can have eternal life. Salvation is available to all who hear the gospel.

    There is nothing difficult about that.

    1 Peter 3:20-21...were saved through water. 21 and this water symbolizes baptism that now saves you also---not the removal of dirt from the body but the pledge of a good conscience toward God. It saves you by the resurrection of Jesus Christ,

    1. Water baptism is essential to salvation.
    2. Water baptism saves you if you have good conscience toward God.
    3. Without the resurrection of Jesus no one could be saved.

    You do not need a masters in education to understand that verse of Scripture.

    Is the gospel difficult to understand? No it is not. The gospel plan of salvation is only made complicated when presented using man-made traditions.

    WHAT MUST I DO TO BE SAVED?
    1. FAITH: John 3:16
    2. REPENTANCE: Acts 2:38
    3. CONFESSION: Romans 10:9
    4. WATER BAPTISM: Mark 16:16


    JUST READ THE BIBLE AND BELIEVE IT.

    (Scripture from: THE THOMPSON CHAIN-REFERENCE BIBLE "NEW INTERNATIONAL VERSION 1983)

    YOU INVITED TO FOLLOW MY BLOG. http://steve-finnell.blogspot.com

    ReplyDelete