2

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

2

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.

| improve this answer | |
0

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

Alias /recommender /home/me/app

| 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
0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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