centos中apache自用常用额外配置记录(xwamp)

发布时间:2017-7-1 11:26:57编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"centos中apache自用常用额外配置记录(xwamp) ",主要涉及到centos中apache自用常用额外配置记录(xwamp) 方面的内容,对于centos中apache自用常用额外配置记录(xwamp) 感兴趣的同学可以参考一下。

xwamp套件中apache配置,记录下,以免忘记。

配置路径

${wwwroot_dir}/conf/httpd.conf

配置内容

<ifmodule mod_deflate.c>  DeflateCompressionLevel 6  AddOutputFilterByType DEFLATE text/html text/plain text/xml  AddOutputFilter DEFLATE js css html htm</ifmodule># 默认的运行模式<IfModule mpm_prefork_module>    StartServers             5    MinSpareServers          5    MaxSpareServers         10    MaxRequestWorkers      250    MaxConnectionsPerChild 10000</IfModule># 运行模式 worker 更高的并发<IfModule mpm_worker_module>    StartServers             3    MinSpareThreads         75    MaxSpareThreads        250     ThreadsPerChild         25    MaxRequestWorkers      400    MaxConnectionsPerChild 10000</IfModule># MaxMemFree 2MB<IfModule !mpm_netware_module>    MaxMemFree            2048</IfModule>Timeout 15KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 5TraceEnable offHostnameLookups Off<IfModule reqtimeout_module>  RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500</IfModule># 自定义日志格式<IfModule log_config_module>  LogFormat "%{%Y-%m-%d %H:%M:%S}t %h %>s %b \"%r\" \"%{Referer}i\" \"%{User-Agent}i\"" LogFormat_xwamp</IfModule># 禁止某些请求头访问 比如:恶意蜘蛛<Location />  SetEnvIfNoCase User-Agent ".*(ZmEu|BLEXBot|MJ12bot|AhrefsBot|ChinasoSpider|DotBot|megaindex)" BADBOT  Order allow,deny  Allow from all  deny from env=BADBOT</Location># 不记录静态文件记录<FilesMatch ".+\.(ico|gif|jpg|swf|png|css|js)$">  SetEnv STATICFILE 1</FilesMatch><VirtualHost *:80>  ServerAdmin admin@xwamp.com  DocumentRoot "$wwwroot_dir/www"  ServerName 127.0.0.1   ErrorLog $wwwroot_dir/logs/error.log  CustomLog ${wwwroot_dir}/logs/access.log LogFormat_xwamp env=!STATICFILE  php_admin_value open_basedir $wwwroot_dir/www:/tmp:/proc<Directory "$wwwroot_dir/www">  SetOutputFilter DEFLATE  Options FollowSymLinks ExecCGI  Require all granted  AllowOverride All  Order allow,deny  Allow from all  DirectoryIndex index.html index.php</Directory><Location /server-status>  SetHandler server-status  Order Deny,Allow  Deny from all  Allow from 127.0.0.1</Location></VirtualHost>ProtocolsHonorOrder OnProtocols h2 http/1.1PidFile /var/run/httpd.pidServerTokens ProductOnlyServerSignature OffInclude ${wwwroot_dir}/conf/vhost-*.conf


上一篇:多线程(2)Thread
下一篇:elastic

相关文章

相关评论

本站评论功能暂时取消,后续此功能例行通知。

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

好贷网好贷款