使用mod_proxy改进LAMP 安全

http://tech.ddvip.com   2007年03月04日    社区交流

使用mod_proxy改进LAMP 安全。

  清单 3. 个人客户的 Apache 配置

# Stuff every Apache configuration needs
ServerType standalone
LockFile /var/lock/apache/accept.nimrod.lock
PidFile /var/run/apache.nimrod.pid
ServerName necessaryevil.nimrod.tld
DocumentRoot "/home/nimrod/web"
# Essential modules
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
# Which user to run this Apache configuration as
User nimrod
Group nimrod
# This must be off else the host isn't passed correctly
UseCanonicalName Off
# The IP/port combination to listen on
Listen 127.0.0.2:10001
# Using name-based virtual hosting allows you to host multiple sites per IP/port combo
NameVirtualHost 127.0.0.2:10001
<VirtualHost 127.0.0.2:10001>
    ServerName www.reckless.tld
    # You can add aliases so long as the facade server is aware of them!
    ServerAlias reckless.tld
    DocumentRoot "/home/nimrod/web/www.reckless.tld"
    <Directory /home/nimrod/web/www.reckless.tld/>
      Options Indexes FollowSymLinks MultiViews ExecCGI Includes
      AllowOverride All
      Order allow,deny
      Allow from all
    </Directory>
</VirtualHost>

  清单 4 说明了门面 Apache 实例的配置。

  清单 4. 门面 Apache 实例的 Apache 配置

来源:IBM DW中国    作者:Nick Maynard    责编:豆豆技术应用

正在加载评论...