[MKDoc-commit] Things for logs and error documents on the admin interface added

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Tue May 3 15:58:45 BST 2005


Log Message:
-----------
Things for logs and error documents on the admin interface added

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/tools:
        install-details-gt.pl

-------------- next part --------------
Index: install-details-gt.pl
===================================================================
RCS file: /var/spool/cvs/mkd/tools/install-details-gt.pl,v
retrieving revision 1.21.2.26
retrieving revision 1.21.2.27
diff -Ltools/install-details-gt.pl -Ltools/install-details-gt.pl -u -r1.21.2.26 -r1.21.2.27
--- tools/install-details-gt.pl
+++ tools/install-details-gt.pl
@@ -384,22 +384,12 @@
     RedirectMatch permanent .+/\.sitemap\.html\$ http://www.$domain_name/.sitemap.html
     Alias /.static/css    $site_dir/resources/skin
     Alias /.static        $site_dir/static
-
-    <Location /.server-status>
-        SetHandler server-status
-    </Location>
-    <Location /.perl-status>
-        require valid-user
-        SetHandler perl-script
-        PerlHandler Apache::Status
-    </Location>
-    RedirectMatch ^/.logs\$ http://www.$domain_name/.logs/
-    <Directory $site_dir/logs/>
-        Options Indexes
-    </Directory>
-    Alias /.logs/ $site_dir/logs/
-
     Alias /               /usr/local/mkdoc/cgi/mkdoc.cgi/
+    # Custom error documents
+    #ErrorDocument 401 /.static/css/401.html
+    #ErrorDocument 403 /.static/css/403.html
+    #ErrorDocument 404 /.static/css/404.html
+    #ErrorDocument 500 /.static/css/500.html
 END
 my $handler = <<END;
     PerlRequire MKDoc/Handler/Initialize.pm
@@ -422,6 +412,10 @@
     #CustomLog $site_dir/logs/perl_access_log combined
 $handler
 $env
+    # Redirect requests for server status and logs to the users interface
+    Redirect /.server-status http://users.bndfc.co.uk/.server-status
+    Redirect /.perl-status http://users.bndfc.co.uk/.perl-status
+    Redirect /.logs http://users.bndfc.co.uk/.logs
 $alias
 </VirtualHost>
 
@@ -433,13 +427,60 @@
     #CustomLog $site_dir/logs/perl_access_log combined
 $handler
 $env
-$alias
-    <Location />
-        PerlAuthenHandler     MKDoc::Handler::Authenticate
+    # apache icons, needed for the logs
+    Alias /icons/ /var/httpd/icons/
+    <Location /.server-status>
+        SetHandler server-status
+        AuthType Basic
         AuthName "Please enter your user credentials"
+        AuthUserFile /var/home/mkdoc16/.htpasswd
+        require valid-user
+    </Location>
+    <Location /.perl-status>
         AuthType Basic
+        AuthName "Please enter your user credentials"
+        AuthUserFile /var/home/mkdoc16/.htpasswd
         require valid-user
+        SetHandler perl-script
+        PerlHandler Apache::Status
     </Location>
+    RedirectMatch ^/.logs$ http://users.$domain_name/.logs/
+    <Directory /var/home/mkdoc16/bndfc.co.uk/logs/>
+        Options Indexes
+        PerlAuthenHandler MKDoc::Handler::Authenticate
+        AuthName "Please enter your user credentials"
+        AuthType Basic
+        require user admin
+    </Directory>
+    Alias /.logs/ /var/home/mkdoc16/$domain_name/logs/
+    #<Location />
+    #    PerlAuthenHandler     MKDoc::Handler::Authenticate
+    #    AuthName "Please enter your user credentials"
+    #    AuthType Basic
+    #    require valid-user
+    #</Location>
+    <LocationMatch ^\/\$>
+        PerlAuthenHandler MKDoc::Handler::Authenticate
+        PerlAuthzHandler  MKDoc::Handler::GroupAuthz
+        AuthName "Please enter your user credentials"
+        AuthType Basic
+        require valid-user
+    </LocationMatch>
+    <LocationMatch ^\/[a-zA-Z0-9]>
+        PerlAuthenHandler MKDoc::Handler::Authenticate
+        PerlAuthzHandler  MKDoc::Handler::GroupAuthz
+        AuthName "Please enter your user credentials"
+        AuthType Basic
+        require valid-user
+    </LocationMatch>
+    <LocationMatch ^\/\.(account|admin|sitemap|print|headlines|meta|search)>
+        PerlAuthenHandler MKDoc::Handler::Authenticate
+        PerlAuthzHandler  MKDoc::Handler::GroupAuthz
+        AuthName "Please enter your user credentials"
+        AuthType Basic
+        require valid-user
+    </LocationMatch>
+$alias
 </VirtualHost>
 
 END


More information about the MKDoc-commit mailing list