Linux – Install .war File on Tomcat, get 503 Error

apache-2.2arch-linuxjavalinuxtomcat

I'm trying to install "YouTrack" on an ArchLinux box with Apache & Tomcat. I'm totally new to Tomcat though and I'm getting a "503 Service Temporarily Unavailable" error.

I installed Tomcat7 via package manager and put "youtrack.war" into this path: /usr/share/tomcat7/webapps/youtrack.war

I modified Tomcat's server.xml here:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Then in Apache I then configured this:

Listen 8081
NameVirtualHost *:8081

<VirtualHost *:8081>
ProxyPass / ajp://127.0.0.1:8009/youtrack
ProxyPassReverse / ajp://127.0.0.1:8009/youtrack
</VirtualHost>

I then proceeded to restart both services and went to "http://<server>:8081/" and got a 503 error:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

It appears that Tomcat uncompressed the war file into /usr/share/tomcat7/webapps/youtrack/, so I'm pretty sure that's working.

Thanks

UPDATE

I added this to virtualhost and it worked:

   <Proxy *>
     AddDefaultCharset Off
     Order deny,allow
     Allow from all
   </Proxy>

Best Answer

Un-comment the AJP section in tomcat server.xml file and user that port in your vhost section of apache config file. The protocol must be AJP and not HTTP to work.