-
Notifications
You must be signed in to change notification settings - Fork 10
/
httpd.zentao.conf
178 lines (161 loc) · 4.74 KB
/
httpd.zentao.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# server basic settings.
ServerRoot "/opt/zbox/run/apache"
PidFile /opt/zbox/tmp/apache/httpd.pid
DocumentRoot "/opt/zbox/app/htdocs"
Listen 80
User nobody
Group nogroup
ServerAdmin [email protected]
ServerName localhost
EnableMMAP off
EnableSendfile off
TypesConfig /opt/zbox/etc/apache/mime.types
# performance settings.
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
UseCanonicalName Off
HostnameLookups Off
# security.
AccessFileName .ztaccess
ServerTokens Prod
ServerSignature Off
# deflat.
AddType image/x-icon .ico
AddType image/gif .gif
AddType image/jpeg .jpg .jpeg
AddType image/png .png
AddType application/javascript .js
DeflateCompressionLevel 9
AddOutputFilterByType DEFLATE text/html text/css application/javascript
# modules.
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule alias_module modules/mod_alias.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule filter_module modules/mod_filter.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule ssl_module modules/mod_ssl.so
# php module.
LoadModule php7_module modules/libphp7.so
AddType application/x-httpd-php .php .php3 .php4
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
# directory settings.
DirectoryIndex index.html index.htm index.php
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory "/opt/zbox/app/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
<DirectoryMatch "/opt/zbox/app/htdocs/.+/.*">
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
</DirectoryMatch>
<Files ".zt*">
Require all denied
</Files>
# logs
ErrorLog "/opt/zbox/logs/apache_error_log"
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "/opt/zbox/logs/apache_access_log" combined
# If you want visit zentao like http://localhost/, uncomment these lines.
#<VirtualHost *:80>
# ServerAdmin [email protected]
# DocumentRoot "/opt/zbox/app/zentao/www"
# ServerName localhost
# <Directory />
# AllowOverride all
# Require all granted
# </Directory>
# ErrorLog "/opt/zbox/logs/apache_error_log"
# CustomLog "/opt/zbox/logs/apache_access_log" combind
#</VirtualHost>
# setting for zentaopms.
Alias /zentao "/opt/zbox/app/zentao/www/"
<Directory "/opt/zbox/app/zentao/www">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
<Files "upgrade.php">
SetHandler application/x-httpd-php
</Files>
<Files "install.php">
SetHandler application/x-httpd-php
</Files>
<Files "checktable.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
<DirectoryMatch "/opt/zbox/app/zentao/www/.+/.*">
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
</DirectoryMatch>
# setting for zentaopro.
Alias /pro "/opt/zbox/app/zentaopro/www/"
<Directory "/opt/zbox/app/zentaopro/www">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
<Files "upgrade.php">
SetHandler application/x-httpd-php
</Files>
<Files "install.php">
SetHandler application/x-httpd-php
</Files>
<Files "checktable.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
<DirectoryMatch "/opt/zbox/app/zentaopro/www/.+/.*">
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
</DirectoryMatch>
# setting for admin
Alias /adminer "/opt/zbox/app/adminer"
<Directory "/opt/zbox/app/adminer">
AuthName 'zentao admin(run /opt/zbox/auth/adduser.sh to add user.)'
AuthType Basic
AuthUserFile /opt/zbox/auth/users
require valid-user
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
<DirectoryMatch "/opt/zbox/app/adminer/.+/.*">
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
</DirectoryMatch>