apache 配置
ServerRoot "/app/apache"
#apache服务器安装目录
#Listen 12.34.56.78:80
Listen 31001
#监听服务器那个端口
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.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_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_forensic_module modules/mod_log_forensic.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule weblogic_module modules/mod_wl_22.so
LoadModule ssl_module modules/mod_ssl.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#如果加载mpm_netware_module模块 就执行里面的内容。
User dcos
Group docker
#启用apache 用户和用户组
</IfModule>
</IfModule>
ServerAdmin you@example.com
#邮件地址
#ServerName www.example.com:80
#DNS name
DocumentRoot "/app/statics"
#静态资源文件路径
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/app/statics">
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
#ErrorLog "/app/logs/error_log"
ErrorLog "|/app/apache/bin/rotatelogs /app/logs/error_%Y%m%d.log 86400 480"
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
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>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "|/app/apache/bin/rotatelogs /app/logs/access_%Y%m%d.log 86400 480" common
#
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/app/apache/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>
#
# "/app/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/app/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#<Directory "/home/macg/www/test">
#Options All 允许对目录的操作,
#ALL---所有操作 AllowOverride all AllowOverride all----允许.htaccess所有指令,
#缺省是all
#AllowOverride None -#完全忽略.htaccess文件
#</Directory>
DefaultType text/plain
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
ErrorDocument 404 /missing.html
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
ServerSignature Off
ServerTokens Prod
TraceEnable Off
<Location />
<Limit OPTIONS PUT DELETE>
AuthType Basic
AuthName "Limit OPTIONS"
Require valid-user
</Limit>
</Location>
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://proxy>
BalancerMember http://10.186.186.59:31001/ loadfactor=1 route=10.186.186.59
BalancerMember http://10.186.186.60:31001/ loadfactor=1 route=10.186.186.60
ProxySet lbmethod=byrequests stickysession=ROUTEID
</Proxy>
<VirtualHost *:31001>
ProxyPass / balancer://proxy/
ProxyPassReverse / balancer://proxy/
</VirtualHost>
#<VirtualHost *:80>
# ip 加端口
# #文档的根目录
# DocumentRoot "\phpStudy\WWW\cq"
# #域名
# ServerName www.cq.com
# ServerAlias
# #配置rewrite相关选项
# <Directory "\phpStudy\WWW\cq">
# Options FollowSymLinks ExecCGI
# #是否启用rewrite
# AllowOverride All
# Order allow,deny
# #是否显示列表 (在发布项目后一般是不启用,对于这个配置,针对DocumentRoot在apachede的默认文件夹外的目录生效。比如下面的例一 )
# Options +indexes
# Allow from all
# #拒绝所有的访问
# #Deny from all
# Require all granted
# RewriteRule ^/(cpicweb/view/customer/servingcenter/complaint/AddPropertyInsuranceComplaint.jsp$) http://service.cpic.com.cn/selfComplaints/init [L,R=permanent]
# RewriteRule ^/cpicweb/logoutRedirect(.*)$ http://www.cpic.com.cn? [L,R=permanent]
# </Directory>
# </VirtualHost>
# 设置代理
#Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
#<Proxy balancer://proxy>
# BalancerMember http://10.186.186.59:31001/ loadfactor=1 route=10.186.186.59
# BalancerMember http://10.186.186.60:31001/ loadfactor=1 route=10.186.186.60
# ProxySet lbmethod=byrequests stickysession=ROUTEID
#</Proxy>