LAMP详解及源码编译安装过程(2)


 DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/usr/local/apache/htdocs" -------把该项禁用掉;
<Directory "/usr/local/apache/htdocs"> # Virtual hosts
Include /etc/httpd/extra/httpd-vhosts.conf ----打开虚拟主机选项;
5)编辑/etc/httpd/extra/httpd-vhosts.conf配置文件:

#<VirtualHost *:80> -------把下面示例虚拟主机选项禁用掉;
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot "/usr/local/apache/docs/dummy-host.example.com"
#    ServerName dummy-host.example.com
#    ServerAlias
#    ErrorLog "logs/dummy-host.example.com-error_log"
#    CustomLog "logs/dummy-host.example.com-access_log" common
#</VirtualHost>
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host2.example.com
#    DocumentRoot "/usr/local/apache/docs/dummy-host2.example.com"
#    ServerName dummy-host2.example.com
#    ErrorLog "logs/dummy-host2.example.com-error_log"
#    CustomLog "logs/dummy-host2.example.com-access_log" common
#</VirtualHost>
<VirtualHost *:80> -----------------------增加一下三个虚拟主机,主页面根据自己情况而定;
   ServerName
   DocumentRoot /web/vhosts/www
   <Directory "/web/vhosts/www">
      Options Indexes
      AllowOverride none
      Require all granted
   </Directory>
</VirtualHost>
<VirtualHost *:80>
   ServerName pma.magedu.com
   DocumentRoot /web/vhosts/pma
</VirtualHost>
6)编辑/etc/man.config文件,将man命令永久生效:
# Every automatically generated MANPATH includes these fields
#
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
MANPATH /usr/local/apache/man-----添加man命令路径;
#
# Uncomment if you want to include one of these by default
7)让apache的头文件能被访问到:
#ln -sv /usr/local/apache/include/ /usr/include/
8)开机让httpd服务能进行正常的开启、关闭、重启:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/7b0880853f6238fe3b83398935753f30.html