痴心VS绝对 发表于 2018-11-20 13:29:01

apache配置httpd

  1、打开 bin\apache\apache2.2.8\httpd.conf 中去掉
Include conf/extra/httpd-vhosts.conf
   前的#号

  2、打开 conf/extra/httpd-vhosts.conf 中添加
NameVirtualHost *:80
  之后根据项目依照下面的格式来修改


    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "D:/wamp/www/test"
    ServerName test
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
   
      Options Indexes FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
   

  3、打开 C:\WINDOWS\system32\drivers\etc\hosts 文件添加

127.0.0.1       test
  注意:这是的网站名与httpd-vhost中的ServerName一直

  4、最后重启apache,打开浏览器,输入http://test即可
  

  




页: [1]
查看完整版本: apache配置httpd