Apache 安装、配置、优化

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

本文详细介绍Apache 安装、配置、优化

  接着,将启动程序放入开机程序中去。 如果要启动 ssl 加密网页,则必须通过手动启动 apache2.0 (参见 ssl 部分 )

  代码:

  # echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.local 

  参考:

  代码:

  If you want your server to continue running after a system reboot ,
  you should add a call to apachectl to your system startup files (typically rc.local or
  a file in an rc.N directory). This will start Apache as root. Before doing this ensure
  that your server is properly configured for security and access restrictions. 

  在 profile 里面添加以上的语句来设置路径,使得在 bash 下更容易控制 apachectl, 省去了输入路径的麻烦。

  代码:

  # vi /etc/profile

  PATH=" $PATH:usr/local/apache2/bin:” 

  配置 apache2.0

  代码:

  # vi /usr/local/apache2/conf/httpd.conf 

  配置文件请看文件 httpd.conf (设置文档目录为/home/dalouis/public_html)

  代码:

  #chmod 755 – R /home/dalouis/ 

  设置目录的可读性为 drwxr-xr-x(755), 否则会出现 "Forbidden You don't have permission to access / on this server."

  一些关于安全性的配置:

  考虑到 cgi-bin 的安全性问题,我们暂时将 cgi-bin 去掉。将所有 httpd.conf 中的所有关于 cgi-bin 的行加上 #.

  Xiyang 的配置

  我用的: mod_limitipconn, mod_expires, mod_gzip, mod_php4, mod_so, mod_access, mod_alias, mod_userdir, mod_dir, mod_autoindex, mod_status, mod_mime, mod_log_config, http_core

作者:jdsf    责编:豆豆技术应用

正在加载评论...