-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttpd.conf
232 lines (171 loc) · 6.07 KB
/
httpd.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# main apache configuration file
# for detailed information about config file
# see <URL:http://httpd.apache.org/docs/2.4/>
# server root top directory
# termux directory to kept error and log files
# server root directory
ServerRoot "/data/data/com.termux/files/usr"
# listen allows user to bind apache ip/ports
# change this to listen specific ip addresses
# localhost
Listen 8080
# load module
LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so
# load php module
LoadModule php_module libexec/apache2/libphp.so
LoadModule authn_file_module libexec/apache2/mod_authn_file.so
# load module
LoadModule authn_core_module libexec/apache2/mod_authn_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so
LoadModule authz_user_module libexec/apache2/mod_authz_user.so
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule access_compat_module libexec/apache2/mod_access_compat.so
LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so
LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule filter_module libexec/apache2/mod_filter.so
LoadModule mime_module libexec/apache2/mod_mime.so
LoadModule log_config_module libexec/apache2/mod_log_config.so
LoadModule env_module libexec/apache2/mod_env.so
LoadModule headers_module libexec/apache2/mod_headers.so
LoadModule setenvif_module libexec/apache2/mod_setenvif.so
LoadModule version_module libexec/apache2/mod_version.so
LoadModule slotmem_shm_module libexec/apache2/mod_slotmem_shm.so
LoadModule unixd_module libexec/apache2/mod_unixd.so
LoadModule status_module libexec/apache2/mod_status.so
LoadModule autoindex_module libexec/apache2/mod_autoindex.so
# file match
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# if module conf
<IfModule !mpm_prefork_module>
#LoadModule cgid_module libexec/apache2/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
#LoadModule cgi_module libexec/apache2/mod_cgi.so
</IfModule>
# load module
LoadModule negotiation_module libexec/apache2/mod_negotiation.so
LoadModule dir_module libexec/apache2/mod_dir.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule alias_module libexec/apache2/mod_alias.so
# optional
<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
#User daemon
#Group daemon
</IfModule>
# main server configuration
# config server admin
ServerAdmin you@example.com
# directory
<Directory />
AllowOverride none
Require all granted
</Directory>
# directory config path
DocumentRoot "/data/data/com.termux/files/home/htdocs"
<Directory "/data/data/com.termux/files/home/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
# directory index required
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
# view by web clients
<Files ".ht*">
Require all denied
</Files>
# error log
ErrorLog "var/log/apache2/error_log"
LogLevel warn
<IfModule log_config_module>
# log format
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "var/log/apache2/access_log" common
#CustomLog "var/log/apache2/access_log" combined
</IfModule>
<IfModule alias_module>
# Redirect permanent /foo http://www.example.com/bar
# Alias /webpath /full/filesystem/path
ScriptAlias /cgi-bin/ "/data/data/com.termux/files/usr/lib/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#Scriptsock cgisock
</IfModule>
# directory
<Directory "/data/data/com.termux/files/usr/lib/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig etc/apache2/mime.types
#AddType application/x-gzip .tgz
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#AddHandler cgi-script .cgi
#AddHandler type-map var
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
#MIMEMagicFile etc/apache2/magic
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#MaxRanges unlimited
#EnableMMAP off
#EnableSendfile on
# Server-pool management (MPM specific)
#Include etc/apache2/extra/httpd-mpm.conf
# Multi-language error messages
#Include etc/apache2/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include etc/apache2/extra/httpd-autoindex.conf
# Language settings
#Include etc/apache2/extra/httpd-languages.conf
# User home directories
#Include etc/apache2/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include etc/apache2/extra/httpd-info.conf
# Virtual Hosts
Include etc/apache2/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include etc/apache2/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include etc/apache2/extra/httpd-dav.conf
# Various default settings
#Include etc/apache2/extra/httpd-default.conf
# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include etc/apache2/extra/proxy-html.conf
</IfModule>
# Secure (SSL/TLS) connections
#Include etc/apache2/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
# Load config files from the config directory 'conf.d'.
Include etc/apache2/conf.d/*.conf