-
Notifications
You must be signed in to change notification settings - Fork 4
/
httpd.common.conf
100 lines (91 loc) · 2.7 KB
/
httpd.common.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
# server basic settings.
ServerRoot "/opt/lampp"
DocumentRoot "/opt/lampp/htdocs"
Listen 80
User nobody
Group nogroup
ServerAdmin [email protected]
ServerName localhost
EnableMMAP off
EnableSendfile off
TypesConfig etc/mime.types
# performance settings.
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
UseCanonicalName Off
HostnameLookups Off
# security.
AccessFileName .htaccess
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
# php module.
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .php3 .php4
# directory settings.
DirectoryIndex index.html index.htm index.php
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory "/opt/lampp/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Files ".ht*">
Require all denied
</Files>
# logs
ErrorLog "logs/error_log"
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "logs/access_log" combined
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/opt/lampp/htdocs"
ServerName localhost
<Directory />
AllowOverride all
Require all granted
</Directory>
ErrorLog "logs/error_log"
CustomLog "logs/access_log" combind
</VirtualHost>
# setting for admin
Alias /phpmyadmin "/opt/lampp/phpmyadmin"
<Directory "/opt/lampp/phpmyadmin">
AuthName 'phpmyadmin admin(run /opt/lampp/auth/adduser.sh to add user.)'
AuthType Basic
AuthUserFile /opt/lampp/auth/users
require valid-user
</Directory>