0

On httpd 2.4

alias /repo /repos
<Location /repos>
Require ip 192.168.0.7
</Location>

I can reach repos but not repo (403 forbidden). If I use directory instead of location nothing changes. Why?

1

According to apache alias documentation:

   Description: Maps URLs to filesystem locations
   Syntax:  Alias URL-path file-path|directory-path

You should define alias like:

   alias /repo /absolute/path/to/repos 

If /absolute/path/to/repos is outside DocumentRoot, you should specify additional <Directory> sections which cover the destination of aliases.

Here is a useful link on how to remap url using: RewriteRule, Alias or Redirect

0

Solution found. Need options indexes correct syntax

alias /repo /var/www/htdocs/repos
<Location /repos>
Require ip 192.168.0.7
</Location>
<Location /repo>
options indexes
Require ip 192.168.0.7
</Location>

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.