Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 domain.com. What I would like to do is access my web application (located at /home/me/app) through a directory, using something like: domain.com/myapp.

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 mydomain.com/recommender/somedir. 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.

Thanks

share|improve this question

3 Answers 3

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 mydomain.com/recommender/somedir. 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

 
discard

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.