Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my httpd.conf configured with Virtual hosts:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www/foo/

<VirtualHost *:80>
DocumentRoot /var/www/

The second virtual host is a Wordpress blog, configured with .htaccess, and index.php in the root i.e. /var/www, and rest of the files in wordpress's own folder.

However, the first virtual host is a "war" file, and when I goto, I see the directory listing, containing the war. I also tried changing the DocumentRoot to /var/www/foo/foo.war` but I get an error

Restarting web server: apache2Warning: DocumentRoot [/var/www/foo/foo.war] does not exist

I also changed the owner and permission of the war to www-data:www-data and changed the permissions to 755, but to no avail.

How do I make apache deploy my "war"?


share|improve this question
up vote 2 down vote accepted

apache doesn't deploy war files.. Tomcat does. So use that instead.

share|improve this answer
yes, that didnt strike me. I configured it with mod_proxy. It works now. – theTuxRacer Jan 17 '11 at 16:33

In addition to Mike's answer which is your fundamental problem, the ServerName directive used for name-based vhosts [among other things] takes a domain name, not a URL with a scheme on it.

Of course this would only get you to your static content, not actually get your EE app working with Apache alone.

share|improve this answer
thanks a lot, that was informative :) – theTuxRacer Jan 17 '11 at 16:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.