]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Apache example config file do not use .htaccess files
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 18 Jul 2015 18:18:29 +0000 (20:18 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 13 Aug 2015 06:51:50 +0000 (08:51 +0200)
gui/baculum/examples/rpm-template/baculum-apache.conf
gui/baculum/examples/rpm-template/baculum-lighttpd.conf

index cb20a960fb129cc4f7718d80c2f06479f195b392..7dc51c20ec5ceb5273482b10c7bddd8072a7cb9d 100644 (file)
@@ -6,10 +6,41 @@ Listen 9095
        CustomLog %LOGDIR/baculum-access.log combined
        ErrorLog %LOGDIR/baculum-error.log
        <Directory %DOCUMENTROOT>
-               AllowOverride All
+               Options +FollowSymLinks
+               RewriteEngine On
+               RewriteCond %{REQUEST_FILENAME} !-d
+               RewriteCond %{REQUEST_FILENAME} !-f
+               RewriteRule ^(.*)$ index.php/$1 [L]
                AuthType Basic
                AuthName "Baculum Auth"
                AuthUserFile %DOCUMENTROOT/protected/Data/baculum.users
                Require valid-user
        </Directory>
-</VirtualHost>
\ No newline at end of file
+       <Directory %DOCUMENTROOT/protected>
+               Order Deny,Allow
+               Deny from all
+       </Directory>
+       <Directory %DOCUMENTROOT/framework>
+               Order Deny,Allow
+               Deny from all
+       </Directory>
+       <Directory %DOCUMENTROOT/framework/Wsat/themes>
+               Order Deny,Allow
+               Deny from all
+       </Directory>
+       <Directory %DOCUMENTROOT/framework/Web/Javascripts/source>
+               <ifModule mod_gzip.c>
+                       mod_gzip_on Yes
+                       mod_gzip_dechunk Yes
+                       mod_gzip_item_include file \.js$
+                       mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
+               </ifModule>
+               <ifModule mod_expires.c>
+                       ExpiresActive On
+                       ExpiresDefault "access plus 864000 seconds"
+               </ifModule>
+               <ifModule mod_headers.c>
+                       Header set Cache-Control "max-age=864000, private"
+               </ifModule>
+       </Directory>
+</VirtualHost>
index d009fc89d68e5aa84ad59b565a52521c4f221fd6..fb7f944233e8172810ada2073e3c5017e7400b95 100644 (file)
@@ -12,56 +12,92 @@ accesslog.filename    = "%LOGDIR/baculum-access.log"
 server.pid-file       = "/var/run/baculum.pid"
 
 server.modules = (
-        "mod_auth",
-        "mod_alias",
-        "mod_rewrite",
-        "mod_fastcgi",
-        "mod_accesslog"
+       "mod_auth",
+       "mod_alias",
+       "mod_rewrite",
+       "mod_setenv",
+       "mod_fastcgi",
+       "mod_access",
+       "mod_accesslog"
 )
 
-auth.backend          = "htpasswd"
+auth.backend = "htpasswd"
 auth.backend.htpasswd.userfile = "%DOCUMENTROOT/protected/Data/baculum.users"
 auth.require = ( "/" => (
-        "method" => "basic",
-        "realm" => "Baculum Auth",
-        "require" => "valid-user"
-))
+       "method" => "basic",
+       "realm" => "Baculum Auth",
+       "require" => "valid-user"
+       )
+)
 
-index-file.names      = ( "index.php" )
+index-file.names = ( "index.php" )
 
 static-file.exclude-extensions = ( ".php" )
 
 dir-listing.encoding  = "utf-8"
 
 mimetype.assign = (
-   ".html" => "text/html",
-   ".gif" => "image/gif",
-   ".png" => "image/png",
-   ".ico" => "image/x-icon",
-   ".css" => "text/css",
-   ".js" => "application/javascript",
+       ".html" => "text/html",
+       ".gif" => "image/gif",
+       ".png" => "image/png",
+       ".ico" => "image/x-icon",
+       ".css" => "text/css",
+       ".js" => "application/javascript"
 )
 
 alias.url = (
-   "/" => "%DOCUMENTROOT/"
+       "/" => "%DOCUMENTROOT/"
 )
 
-fastcgi.server = (".php"=>((
-  "bin-path"=>"/usr/bin/php-cgi",
-  "socket"=>"/tmp/php.sock",
-  "max-procs" => 1,
-  "bin-environment" => (
-    "PHP_FCGI_CHILDREN" => "4",
-    "PHP_FCGI_MAX_REQUESTS" => "10000"
-  ),
-  "bin-copy-environment" => (
-   "PATH", "SHELL", "USER"
-  ),
-  "broken-scriptfilename" => "enable"
-)))
+fastcgi.server = (
+       ".php"=> (
+               (
+                       "bin-path"=>"/usr/bin/php-cgi",
+                       "socket"=>"/tmp/php.sock",
+                       "max-procs" => 1,
+                       "bin-environment" => (
+                               "PHP_FCGI_CHILDREN" => "4",
+                               "PHP_FCGI_MAX_REQUESTS" => "10000"
+                       ),
+                       "bin-copy-environment" => (
+                               "PATH",
+                               "SHELL",
+                               "USER"
+                       ),
+                       "broken-scriptfilename" => "enable"
+               )
+       )
+)
 
 url.rewrite-once = (
-   "^/themes/(.+)$" => "/themes/$1",
-   "^/assets/(.+)$" => "/assets/$1",
-   "^/(.+)$" => "/index.php/$1"
+       "^/themes/(.+)$" => "/themes/$1",
+       "^/assets/(.+)$" => "/assets/$1",
+       "^/(.+)$" => "/index.php/$1"
+)
+
+url.access-deny = (
+    "^%DOCUMENTROOT/protected/",
+    "^%DOCUMENTROOT/framework/",
+
+    # Wsat is not used by Baculum. Added here for not storing
+    # framework Apache specific .htaccess files
+    "^%DOCUMENTROOT/framework/Wsat/themes/"
 )
+
+### Enable compressing dynamic content ###
+
+# disable mod_compress when request a php file
+$HTTP["url"] !~ "\.php$" {
+       compress.filetype = (
+               "text/plain",
+               "text/html",
+               "text/javascript",
+               "text/css",
+               "text/xml"
+       )
+}
+
+# enable mod_setenv for framework source files:
+$HTTP["url"] =~ "^%DOCUMENTROOT/framework/Web/Javascripts/source/" {
+       setenv.add-response-header = ("Content-Encoding" => "gzip")
+}