110 lines
3.0 KiB
ApacheConf
110 lines
3.0 KiB
ApacheConf
# server basic settings.
|
|
ServerRoot "/opt/lampp"
|
|
DocumentRoot "/opt/lampp/htdocs"
|
|
Listen 80
|
|
User nobody
|
|
Group nogroup
|
|
ServerAdmin zentao@localhost.net
|
|
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 .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
|
|
|
|
# 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 ".zt*">
|
|
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
|
|
|
|
# If you want visit zentao like http://localhost/, uncomment these lines.
|
|
#<VirtualHost *:80>
|
|
# ServerAdmin zentao@local.net
|
|
# DocumentRoot "/opt/lampp/zentao/www"
|
|
# ServerName localhost
|
|
# <Directory />
|
|
# AllowOverride none
|
|
# Require all granted
|
|
# </Directory>
|
|
# ErrorLog "logs/error_log"
|
|
# CustomLog "logs/access_log" combind
|
|
#</VirtualHost>
|
|
|
|
# setting for zentao.
|
|
Alias /zentao "/opt/lampp/zentao/www/"
|
|
<Directory "/opt/lampp/zentao/www">
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
# setting for admin
|
|
Alias /phpmyadmin "/opt/lampp/phpmyadmin"
|
|
<Directory "/opt/lampp/phpmyadmin">
|
|
AuthName 'zentao admin(run /opt/lampp/auth/adduser.sh to add user.)'
|
|
AuthType Basic
|
|
AuthUserFile /opt/lampp/auth/users
|
|
require valid-user
|
|
</Directory>
|