virtual path mapping

I have defined the following virtual path
Alias  /tmp/      /ieur/cre/eeceu11/online/www1/gecs/images/gets/          Alias /tmp/gets/   /ieur/cre/eeceu11/online/www1/gecs/images/gets/
Alias /tmp/ecr/  /ieur/cre/eeceu11/online/www1/gecs/images/ecr/          Alias /tmp/system/  /ieur/cre/eeceu11/online/www1/gecs/images/system/

Among the above four only first difinition is working fine other
three are not? When try to access some file using other three virtual path
(/tmp/gets/ or /tmp/ecr/  or /tmp/system/) apache usage the
first definition only(Alias  /tmp/ /ieur/cre/eeceu11/online/www1/gecs/images/gets/)

and in this situation it always try to search the file as follows
/tmp/ecr/  /ieur/cre/eeceu11/online/www1/gecs/images/gets/ecr          
/tmp/gets/  /ieur/cre/eeceu11/online/www1/gecs/images/gets/gets          
/tmp/system/  /ieur/cre/eeceu11/online/www1/gecs/images/gets/system
since ecr/system and gets are not a physical subdirectory in gets
therefore, it logs the error in the log file File does not exist
Would like to know why Apache server is not picking the longest path
as defined to retrive the correct file

I will be very greatful for any further information to resolve the virtual path mapping issues
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try reordering the definitions so that the
Alias /tmp
comes last

I'm not sure now and I can't check it for the next 10 hours, but try it anyway :)
Your first line is:

Alias  /tmp/      /ieur/cre/eeceu11/online/www1/gecs/images/gets/

ie when someone tries to access /tmp/ they get:

Therefore when they try to access /tmp/gets/ it will access your aliases /tmp/ followed by gets ie:

Likewise for system etc....

The easiest way to get round this is to use the:

FollowSymLinks directive for the /tmp/ aliased directory, and creat symbolic links to the other sub directories that you wish to use.

Hope that helps:)
..then the appropriate directories really do appear as subdirectories:)
Another possibility is to use rewrite rules. The rules are executed (matched) in the order written and can be extremely explicit.

rewrite ^/tmp/gets/*$  /ieur/cre/eeceu11/online/www1/gecs/images/gets/$1 [L]
rewrite ^/tmp/*$ /ieur/cre/eeceu11/online/www1/gecs/images/gets/$1 [L]

The advantage is that you can also use the rules to exclude things and completely control the access to the site. (See module rewrite and the examples/tutorial on the Apache site)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.