问答详情
源自:2-4 WAMPServer多站点配置

localhost访问

1、我更改了网站根目录;并在根目录下新建了test.php;浏览器localhost/test.php可以成功; 2、新建了两个站点后;浏览器locahost/test.php不可以,提示The requested URL /test.php was not found on this server 但是自己新建的两个站点可以用域名访问,请指教问题出在哪里

提问者:此间少年_ 2015-11-25 11:30

个回答

  • bieer_0001
    2015-12-09 15:11:31

    在httpd-vhost.conf里面插入

    <VirtualHost *:80>

        ServerAdmin webmaster@dummy-host2.example.com

        DocumentRoot "你的站点目录"

        ServerName localhost

        ErrorLog "logs/dummy-host2.example.com-error.log"

        CustomLog "logs/dummy-host2.example.com-access.log" common

    </VirtualHost>

    然后在httpd.conf里面

    # Virtual hosts

    #Include conf/extra/httpd-vhosts.conf

    改为

    # Virtual hosts

    Include conf/extra/httpd-vhosts.conf

    接着重启apacha试试

  • bieer_0001
    2015-12-08 16:30:25

    按照你新建的两个站点再建一个叫作localhost的站点呗

  • 晚安sp
    2015-11-25 11:53:40

    localhost再重新配置一下,