tongyi007 发表于 2018-11-26 08:48:48

apache虚拟域名

  --spy 2012-05-06
  apache安装好后的一些配置
  用户组的变更
User web
Group web
出错提示信息
ServerAdminyou@example.com
映射到的物理路径:
DocumentRoot "/data0/htdocs"
   此处为配对信息

最末尾应该包含
   Include conf/extra/httpd-vhosts.conf
  静态配置
修改配置文件/usr/local/webserver/apache/conf/extra/httpd-vhosts.conf
   NameVirtualHost *:80      --切记加入该信息否则不映射多地址
   需要在物理目录下建立对应的bbs和www文件夹 内建不同的index.html

    ServerAdmin nothingisok@qq.com            
    DocumentRoot "/data0/htdocs/bbs"
    ServerName bbs.spy.com
    ErrorLog "/data0/logs/bbs.spy.com-error_log"
    CustomLog "/data0/logs/bbs.spy.com-access_log" common

  
    ServerAdmin eitherisok@qq.com
    DocumentRoot "/data0/htdocs/www"
    ServerName www.spy.com
    ErrorLog "/data0/logs/www.spy.com-error_log"
    CustomLog "/data0/logs/www.spy.com-access_log" common


如果本机验证的话可在C:\WINDOWS\system32\drivers\etc\hosts
文件中加入相关信息



页: [1]
查看完整版本: apache虚拟域名