Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I'm on Ubuntu 9.10. My web application is in a directory on my /home/me/app . I want to configure Apache in such a way that I can access my app through a directory. For example:

People can access my machine through What I would like to do is access my web application (located at /home/me/app) through a directory, using something like:

How can I set up the apache configuration for this kind of behavior? Of course, I do not want to move all my application to /var/www/myapp.

The Alias directive did not solve my problem. If try to enter something like It won't find anything. Because the alias only covers the "/recommender" path

What I would like, is something like a VirtualHost, but instead of pointing to a ServerName, I want to point to a directory name.


share|improve this question

Jumping on an old question here, but for posterity/searchers: a common method here is just to symlink /home/me/app to /var/www/myapp. SSH in and run a quick

ln -s /home/me/app /var/www/myapp

It's not an apache config, but it's clean and does what you want it to. This is assuming, of course, you have /var/www/ set up as your webroot, which seems to be implied.

share|improve this answer

What I wanted is just an alias command in apache.conf:

Alias /recommender /home/me/app

share|improve this answer
please mark this as answered. – xenoterracide Apr 27 '10 at 20:24
In fact, it did not resolve my issue. If try to enter something like It won't find anything. Because the alias only covers the "/recommender" path – Felipe Hummel Apr 27 '10 at 20:49
mod_rewrite or mod_userdir – LatinSuD Sep 20 '10 at 19:01

I would configure it to use mod_userdir but that's me...

share|improve this answer

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.