Update make_project

This commit is contained in:
lfield 2018-08-08 11:49:25 +02:00 committed by GitHub
parent 7916e67547
commit 14d0c80aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 20 deletions

View File

@ -360,53 +360,40 @@ print >>open(httpd_conf_template_filename,'w'), '''
Alias /%(project_shortname)s_ops %(proot)s/html/ops
ScriptAlias /%(project_shortname)s_cgi %(proot)s/cgi-bin
# in the following, the "Order" and "Allow" lines are for Apache 2.2;
# for Apache 2.4, replace them with the single line
# Require all granted
# or
# Require all denied
# NOTE: Turn off access to certain default directories
<Directory "%(proot)s/keys">
Order deny,allow
Deny from all
Require all denied
</Directory>
<Directory "%(proot)s/upload">
Order deny,allow
Deny from all
Require all denied
</Directory>
# NOTE: Allow access but disable PHP script execution
<Directory "%(proot)s/download">
RemoveType .php .phtml
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "%(proot)s/html/stats">
RemoveType .php .phtml
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "%(proot)s/html/user_profile">
RemoveType .php .phtml
Order allow,deny
Allow from all
Require all granted
</Directory>
# NOTE: Allow access and allow PHP script execution
<Directory "%(proot)s/html">
Options Indexes MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
Require all granted
</Directory>
# NOTE: Allow access and allow CGI execution
<Directory "%(proot)s/cgi-bin">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
Require all granted
</Directory>
''' %locals()