You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kenneth Fribert <fr...@yahoo.dk> on 2002/12/08 22:43:38 UTC

[users@httpd] A small problem with access to directories outside DocumentRoot

I've got an apache set up with virtual hosts, that has
a statistics directory outside it's document root, but
a can't get access to it.

This is the config
-----
ServerType standalone
ServerRoot "sys:/apache"
PidFile logs/httpd.pid
ScoreBoardFile logs/apache_status
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
ThreadsPerChild 50
ThreadStackSize 65536
MaxRequestsPerChild 0
Listen IP1:80
Listen IP2:80

LoadModule lcgi_module modules/mod_lcgi.nlm
LoadModule nds_auth_module modules/mod_nds.nlm
LoadModule tls_module modules/mod_tls.nlm
LoadModule jk_module modules/mod_jk.nlm

Port 80

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
<IfModule mod_tls.c>
    SecureListen IP1:443 "SSL CertificateDNS"
    SecureListen IP2:443 "SSL CertificateDNS"
</IfModule>

ServerAdmin webmaster@
<Directory "/">
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    deny from all
</Directory>

DocumentRoot sys:/Apache/usersites/DefaultHost
ServerName DefaultHost
ErrorLog
sys:/Apache/usersites/logs/DefaultHost/errors.txt
CustomLog
sys:/Apache/usersites/logs/DefaultHost/access.txt
combined
DefaultType text/html
<Directory "SYS:/Apache/usersites/DefaultHost">
    AllowOverride None
    Allow from all
</Directory>
Alias /reports
sys:/Apache/usersites/reports/DefaultHost
<Directory
"sys:/Apache/usersites/reports/DefaultHost">
    AuthType Basic
    AuthName "Trafikrapport"
    AuthNDSTree Tree
    AuthNDSContext Context
    AuthNDSRequireSSL Off
    require valid-user
</Directory>

AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

UseCanonicalName Off

DefaultType text/plain

HostnameLookups Off

ServerSignature Off
ServerTokens ProductOnly

BrowserMatch "MSIE" nokeepalive downgrade-1.0
force-response-1.0

JkWorkersFile
"SYS:/tomcat/33/conf/jk/nwworkers.properties"
JkLogFile "SYS:/tomcat/33/logs/mod_jk.log"

JkMount /*.jsp ajp12
JkMount /servlet/* ajp12

NameVirtualHost *

<VirtualHost *>
    ServerAdmin Host
    DocumentRoot "sys:/Apache/usersites/Host"
    ServerName Host
    ServerAlias Host
    ErrorLog
sys:/Apache/usersites/logs/Host/errors.txt
    CustomLog
sys:/Apache/usersites/logs/Host/access.txt combined
    DefaultType text/html
    ServerSignature Off
    <Directory "sys:/Apache/usersites/Host">
        AllowOverride None
        Allow from all
    </Directory>
    <Directory
"sys:/Apache/usersites/Host/Familiesiderne/Private_familiesider">
        AuthType Basic
        AuthName "Familie område - få password hos
Webmaster"
        AuthNDSTree Tree
        AuthNDSContext Context
        AuthNDSRequireSSL Off
        require valid-user
    </Directory>
    <Directory "sys:/Apache/usersites/Host/alarm">
        AuthType Basic
        AuthName "Video overvågning"
        AuthNDSTree Tree
        AuthNDSContext Context
        AuthNDSRequireSSL Off
        require valid-user
    </Directory>
    <Directory "sys:/Apache/usersites/reports/Host">
        AuthType Basic
        AuthName "Trafikrapport"
        AuthNDSTree Tree
        AuthNDSContext Context
        AuthNDSRequireSSL Off
        require valid-user
    </Directory>
    Alias /reports sys:/Apache/usersites/reports/Host
</VirtualHost>
-----

I don't understand why I get a permission denied when
going to Host/reports.
If I remove the <Directory "/"> directives it works,
but that gives access to the whole darn thing, so what
have I done wrong?

Kenneth


Beskyt din computer mod virus og misbrug! Læs mere i Yahoo! Sikkerhedscenter på www.yahoo.dk/sikkerhedscenter

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org