Re: Associate Alias with a VirtualHost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Redirect permanent /usr/share/blah https://www.mydomain.com/blah
>
> Specifying the full path did not work.  This seems a bit inconsistent, since
> redirects under the DocumentRoot specify the full path, including the path to
> the DocumentRoot.

AFAIK, it's always got to be a URL-path and not a filesystem path.

>
> This is acceptable but I'd prefer to just block access from http rather than
> redirect.  Neither of the following two approaches, placed under the default
> <VirtualHost *>, worked:
>
>      <Directory /blah>
>                AllowOverride None
>                Order deny,allow
>                Deny from all
>        </Directory>

This would be for a literal directory of "/blah" in your filesystem.

>
>      <Directory /usr/share/blah>
>                AllowOverride None
>                Order deny,allow
>                Deny from all
>        </Directory>
>

Ought to work if you're really serving a static file mapped to that diretory.

> Out of curiosity, what are the advantages/disadvantages of using an alias to
> redirect and simply creating a file link to the appropriate directory under
> DocumentRoot? If I simply created a link /var/www/blah pointing to
> /usr/share/blah, then I could use a <Directory> container to block access, as
> is done with the /var/www/ssl directory above.  I suspect that there are
> security implications but it isn't clear to me what they are.

Using Alias and a corresponding <Directory> container (2nd arg of
Alias matches Directory container) is pretty normal.   Something else
is confusing your tests.

-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux