Andy's Blog » apmserv 优化, APMServ GZIP, apmserv优化, apmserv 开启gzip, apmserv aspx, APMSERV httpd高, APMServ apache优化, apmserv502 6 MaxRequestsPerChild, apmserver 优化, apmserv安全配置, Include conf apmserv vdir.con » APMserv中对Apache优化的设置

APMserv中对Apache优化的设置

我将注释干掉了。
注意其中对虚拟主机是如何设置的,是Apache2的写法,比较规范。
还有PHP限定到目录,安全模式的开启。

httpd.conf
ThreadsPerChild 500
MaxRequestsPerChild  10000
ServerRoot "D:/AndyServer/Apache"
Listen 80

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.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 cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule ssl_module modules/mod_ssl.so

LoadFile "D:/AndyServer/PHP/libmysql.dll"
LoadModule php5_module "D:/AndyServer/PHP/php5apache2_2.dll"

PHPIniDir "D:/AndyServer/PHP/php.ini"

ServerAdmin [email protected]
ServerName 127.0.0.1:80

DocumentRoot "D:/AndyServer/www/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

<Directory "D:/AndyServer/www/htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml default.shtml
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>

ErrorLog logs/error.log

LogLevel warn

<IfModule log_config_module>
    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>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "D:/AndyServer/www/cgi-bin/"
</IfModule>

<Directory "D:/AndyServer/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddHandler cgi-script .cgi
AddHandler cgi-script .pl
</IfModule>

Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-multilang-errordoc.conf
Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-languages.conf
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-default.conf
Include conf/extra/httpd-ssl.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

NameVirtualHost *:80

<VirtualHost *:80>
 ServerName *
 DocumentRoot "D:/AndyServer/www/htdocs"
</VirtualHost>

<Directory "D:/AndyServer/www/htdocs">
 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
 AllowOverride None
 Order Deny,Allow
 Allow from all
</Directory>

Alias /phpmyadmin "D:/AndyServer/www/phpMyAdmin"

<Directory "D:/AndyServer/www/phpMyAdmin">
 AllowOverride None
 Options Indexes FollowSymLinks Includes
 Order allow,deny
 Allow from all
</Directory>

Alias /sqlitemanager "D:/AndyServer/www/SQLiteManager"
<Directory "D:/AndyServer/www/SQLiteManager">
 AuthUserFile "D:/AndyServer/SQLiteManPwd.ini"
 AuthType Basic
 AuthName "SQLiteManager管理员登录"
 require valid-user
 AllowOverride None
 Options Indexes FollowSymLinks Includes
 Order allow,deny
 Allow from all
</Directory>

ProxyPass   /asp   http://127.0.0.1:10322
ProxyPassReverse   /asp/   http://127.0.0.1:10322/
Include conf/apmserv/vhost.conf
Include conf/apmserv/vhost_ssl.conf
Include conf/apmserv/vdir.conf
vhost.conf
<VirtualHost *:80>
 ServerName test.com
 ServerAlias www.test.com
 DocumentRoot "D:/AndyServer/www/htdocs/test"
</VirtualHost>
<Directory "D:/AndyServer/www/htdocs/test">
 Options IncludesNOEXEC
 DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.shtml index.aspx default.aspx 
 AllowOverride None
 Order Deny,Allow
 Allow from all
 php_admin_value open_basedir "D:/AndyServer/www/htdocs/test/;D:/AndyServer/PHP/uploadtemp/;D:/AndyServer/PHP/sessiondata/"
 RewriteEngine on
 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
 RewriteRule .* - [F]
 php_admin_value safe_mode On
</Directory>

Incoming search terms:

Tags: apache, apmserv

本文地址: http://www.21andy.com/new/20070121/564.html

3 评论 to “PHP开源CMS之MODx”

  1. one 于 2007-01-21 00:18:26 发表:

    收了.呵呵.

  2. Andy 于 2007-01-21 00:21:42 发表:

    晕,回得真快,我刚发完。。。

  3. one 于 2007-01-21 00:23:21 发表:

    嘿嘿~~碰巧了.:)