apache默认网站

一、默认网站

每一个web服务器软件一般默认都会提供一个用于测试的网站,apache也为用户提供了一个默认网站。默认网站的配置写在默认配置文件中。

二、配置文件

[root@apache_251 conf]# cat httpd.conf

ServerRoot “/usr/local/apache”
Listen 80
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
User daemon
Group daemon
ServerAdmin you@example.com
ServerName 127.0.0.1
AllowOverride none
Require all denied
DocumentRoot “/usr/local/apache/htdocs”
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
DirectoryIndex index.html
Require all denied
ErrorLog “logs/error_log”
LogLevel warn
LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”” combined
LogFormat “%h %l %u %t \”%r\” %>s %b” common
LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\” %I %O” combinedio
CustomLog “logs/access_log” common
Redirect permanent /abc http://www.baidu.com
Redirect permanent /123 /7878
Redirect seeother /123 /7878
Redirect gone /123
Alias /abc /usr/local/apache/htdocs/7878
ScriptAlias /cgi-bin/ “/usr/local/apache/cgi-bin/“
AllowOverride None
Options None
Require all granted
RequestHeader unset Proxy early
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
Include conf/extra/proxy-html.conf
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

 

posted @ 2020-05-21 17:25  前海渔文乐  阅读(872)  评论(0编辑  收藏  举报