2016-09-21 31 views
0

我想要在我的laravel項目中創建一個子域, 我啓用的httpd-vhosts.conf這裏就是裏面的代碼 - >laravel子域級別0

enter image description here

,這裏是我的主機文件

enter image description here

,這裏是我的route.php

enter image description here

它返回檢查您的連接, 是否有任何我忘了的步驟。

回答

0

設置虛擬主機這樣

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    DocumentRoot "C:/wamp/www/mysite/public" 
    ServerName mysite.dev 
    ServerAlias www.mysite 
    ErrorLog "logs/mysite-error.log" 
    CustomLog "logs/mysite-access.log" common 
    <Directory "C:/wamp/www/mysite/public"> 
     Options Indexes FollowSymLinks 
     AllowOverride all 
     Order Deny,Allow 
     Deny from all 
     Allow from 127.0.0.1 
    </Directory> 
</VirtualHost> 
127.0.0.1 mysite.dev 

並重新啓動服務器...

設置你的路線

Route::get('/', '[email protected]'); 

HomeController.php

public function index() 
{ 
    return view('welcome'); 
} 
+0

沒有仍然沒有工作 –

+0

現在我編輯了我的答案,檢查並告訴你的錯誤 – Komal