localhost訪問
1、我更改了網站根目錄;并在根目錄下新建了test.php;瀏覽器localhost/test.php可以成功; 2、新建了兩個站點后;瀏覽器locahost/test.php不可以,提示The requested URL /test.php was not found on this server 但是自己新建的兩個站點可以用域名訪問,請指教問題出在哪里
1、我更改了網站根目錄;并在根目錄下新建了test.php;瀏覽器localhost/test.php可以成功; 2、新建了兩個站點后;瀏覽器locahost/test.php不可以,提示The requested URL /test.php was not found on this server 但是自己新建的兩個站點可以用域名訪問,請指教問題出在哪里
2015-11-25
舉報
2015-12-09
在httpd-vhost.conf里面插入
<VirtualHost *:80>
? ? ServerAdmin [email protected]
? ? 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試試
2015-12-08
按照你新建的兩個站點再建一個叫作localhost的站點唄
2015-11-25
localhost再重新配置一下,