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

3 Answers 3

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.

0

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

Alias /recommender /home/me/app

3
  • please mark this as answered. Commented Apr 27, 2010 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 Commented Apr 27, 2010 at 20:49
  • mod_rewrite or mod_userdir Commented Sep 20, 2010 at 19:01
0

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.