2014-10-17 40 views
1

我剛剛在Ubuntu 14.04 LTS上安裝了LAMP,併爲Symfony項目創建了虛擬主機。我沒有改變在Symfony的項目做任何事,但已經爲我嘗試加載AcmeDemoBundle我得到錯誤An error occured while loading the web debug toolbar (404: Not found). Do you want to open profiler?未找到ubuntu虛擬主機調試工具欄上的Symfony2

我做了一些研究,但所有我發現是做.htaccess文件,沒有工作的東西。我有一些懷疑,這可能是在/etc/apache2/sites-enabled/我的虛擬主機的conf文件該文件的內容是:

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName registration.dev 
    ServerAlias www.registration.dev 
    DocumentRoot /var/www/registration/web/ 
    DirectoryIndex app_dev.php 
    ErrorLog ${APACHE_LOG_DIR}/error.log 
    CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost> 

回答

1

我有同樣的問題。這裏爲您/etc/apache2/sites-enabled/

<VirtualHost *:80> 
     ServerName test.dev 
     DocumentRoot /var/www/html/test_symfony/web/ 
     DirectoryIndex app_dev.php 
    <Directory "/var/www/html/test_symfony/web/"> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride All 
     Require all granted 
     Order allow,deny 
     allow from all 
     <IfModule mod_rewrite.c> 
      RewriteEngine On 
      RewriteCond %{REQUEST_FILENAME} !-f 
      RewriteRule ^(.*)$ /app_dev.php [QSA,L] 
     </IfModule> 
    </Directory> 

以下網址工作文件:http://test.dev/home將引導您到主頁沒有調試工具欄。爲了確保你有工具欄指定app_dev.php:http://test.dev/app_dev.php/home 希望它有幫助

相關問題