PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/silverlining/commands/php-devel-server.conf.tmpl

https://bitbucket.org/ianb/silverlining/
Go Template | 119 lines | 91 code | 28 blank | 0 comment | 0 complexity | 3f836088dee67732dc7329527cff97de MD5 | raw file
  1LockFile {{tempdir}}/apache.lock
  2
  3PidFile {{apache_pid_file}}
  4
  5Timeout 600
  6
  7KeepAlive Off
  8
  9<IfModule mpm_prefork_module>
 10    StartServers 1
 11    MinSpareServers 1
 12    MaxSpareServers 1
 13    MaxClients 10
 14    MaxRequestsPerChild 0
 15</IfModule>
 16
 17<IfModule mpm_worker_module>
 18    StartServers          1
 19    MinSpareThreads      25
 20    MaxSpareThreads      75
 21    ThreadLimit          64
 22    ThreadsPerChild      25
 23    MaxClients          150
 24    MaxRequestsPerChild   0
 25</IfModule>
 26
 27AccessFileName .htaccess
 28
 29<Files ~ "^\.ht">
 30    Order allow,deny
 31    Deny from all
 32</Files>
 33
 34DefaultType text/plain
 35
 36HostnameLookups Off
 37
 38ErrorLog {{tempdir}}/error.log
 39
 40LogLevel info
 41
 42## FIXME: Figure out where to look for these?
 43# Include module configuration:
 44
 45{{for inc in includes}}
 46Include {{inc}}
 47{{endfor}}
 48
 49## FIXME: How to load and conf mod_rewrite, etc?
 50
 51## FIXME: do we need this?
 52#NameVirtualHost *:8080
 53ServerName localhost
 54Listen 8080
 55
 56<VirtualHost 127.0.0.1:8080>
 57    ServerAdmin webmaster@localhost
 58    <Directory />
 59        Options FollowSymLinks
 60        AllowOverride None
 61    </Directory>
 62    <Directory ./>
 63        Options Indexes FollowSymLinks MultiViews
 64        AllowOverride None
 65        Order allow,deny
 66        allow from all
 67    </Directory>
 68
 69    <LocationMatch />
 70         # Insert filter
 71        SetOutputFilter DEFLATE
 72
 73        # Netscape 4.x has some problems...
 74        BrowserMatch ^Mozilla/4 gzip-only-text/html
 75
 76        # Netscape 4.06-4.08 have some more problems
 77        BrowserMatch ^Mozilla/4\.0[678] no-gzip
 78
 79        # MSIE masquerades as Netscape, but it is fine
 80        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 81        # Don't compress images
 82        SetEnvIfNoCase Request_URI \
 83        \.(?:gif|jpe?g|png)$ no-gzip dont-vary
 84
 85        # Make sure proxies don't deliver the wrong content
 86        #Header append Vary User-Agent env=!dont-vary
 87    </LocationMatch>
 88
 89    LogFormat "%{SILVER_FORWARDED}e %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{HTTP_HOST}e \"%{SILVER_APP_NAME}e\" %D" wsgi_combined
 90    CustomLog {{tempdir}}/access.log wsgi_combined
 91
 92
 93## Python/WSGI setup:
 94RewriteEngine on
 95## Uncomment if you want to understand what is happening here:
 96#RewriteLog {{tempdir}}/rewrite.log
 97#RewriteLogLevel 5
 98
 99RewriteCond %{HTTP_HOST} ^([^:]*)
100RewriteRule . - [E=SILVER_HOSTNAME:%1]
101RewriteRule . - [E=SILVER_INSTANCE_DIR:{{silver_instance_dir}}]
102RewriteRule . - [E=SILVER_SECRET_FILE:{{silver_secret_file}}]
103RewriteRule . - [E=SILVER_ENV_VARS:{{silver_env_vars}}]
104RewriteRule . - [E=SILVER_FUNCS:{{silver_funcs}}]
105
106{{for prefix in path_prefixes}}
107RewriteCond {{prefix}}%{REQUEST_URI} -f
108RewriteRule (.*/)index.html $1 [L,R=permanent]
109RewriteCond {{prefix}}%{REQUEST_URI} -d
110RewriteCond %{REQUEST_URI} [^/]$
111RewriteCond {{prefix}}%{REQUEST_URI}/index.html -f
112RewriteRule (.*) $1/ [L,R=permanent]
113RewriteCond {{prefix}}%{REQUEST_URI} -f
114RewriteRule !\.php$ {{prefix}}%{REQUEST_URI} [L]
115{{endfor}}
116
117RewriteRule . {{mgr_scripts}}/master-runner.php [L]
118
119</VirtualHost>