当前位置:
首页
文章
前端
详情

apache虚拟主机配置

1、到 hostd.conf 启用 vhosts 配置

Include conf/vhosts/*.conf

2、到 vhosts.conf 添加 listenVirtualHost 配置

Listen 8090
<VirtualHost 127.0.0.1:8090>
    DocumentRoot "E:/phpstudy_pro/WWW/test"
    ServerName www.test.com
    FcgidInitialEnv PHPRC "E:/phpstudy_pro/Extensions/php/php7.3.4nts"
    AddHandler fcgid-script .php
    FcgidWrapper "E:/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php
  <Directory "E:/phpstudy_pro/WWW/test">
      DirectoryIndex index.php index.html
  </Directory>
</VirtualHost>

3、重启apache

免责申明:本站发布的内容(图片、视频和文字)以转载和分享为主,文章观点不代表本站立场,如涉及侵权请联系站长邮箱:xbc-online@qq.com进行反馈,一经查实,将立刻删除涉嫌侵权内容。