2016-07-21 29 views
0

我用:我bitnami WAMP的虚拟主机不正常

  • Windows 7旗舰版64位
  • Bitnami WAMP堆栈5.6.22-0
  • Laravel 5

我所做的:

  1. 编辑我%systemroot%\System32\drivers\etc\hosts文件通过在该行的末尾添加127.0.0.1 juke.dev
  2. 编辑我httpd.conf通过
    • 取消对该行LoadModule vhost_alias_module modules/mod_vhost_alias.so
    • 取消对该行Include conf/extra/httpd-vhosts.conf
  3. 编辑我httpd-vhosts.conf这个:

    <VirtualHost *:80> 
        ServerAdmin [email protected] 
        DocumentRoot "C:/WAMP/apache2/htdocs/claim/public" 
        ServerName juke.dev 
         <Directory "C:/WAMP/apache2/htdocs/claim/public"> 
         Require all granted 
         </Directory> 
    </VirtualHost> 
    
  4. 安装composerlaravel5

  5. 编辑我laravel5routes.php到这一点:

    Route::get('/', '[email protected]'); 
    Route::get('contact', '[email protected]'); 
    
  6. WelcomeController是这样的:

SS controller

现在进入问题

  • 当我去juke.dev,它成功。

juke.dev ss

  • 当我去juke.dev/contact,它失败。

juke.dev/contact SS

  • 当我去localhost/claim/public/contact,它的成功。

enter image description here

我做了什么错?

我仍然在web编程新的,所以任何解释将有助于

回答

1

奇怪的问题:

这是我的虚拟主机的例子:

<VirtualHost *:80> 
    DocumentRoot "G:\Google Drive\Data\Proj\public" 
    ServerName rethinkdb.i 
    ServerAlias www.rethinkdb.i 
    <Directory "G:\Google Drive\Data\Proj\public"> 
    AllowOverride All 
    Require all Granted 
    </Directory> 
</VirtualHost> 

其他的事情,我可以想想也许是你的.htaccess文件。
这是怎么回事?

编辑: 刚刚与您的虚拟主机一起尝试过,并且遇到同样的问题。所以试着在上面使用虚拟主机。

+0

谢谢,'AllowOverride All'修复了这个问题 –