一切順利,我已經運行laravel new
,/etc/apache2/sites-available/laravel.example.com.conf
:Laravel不加載
<VirtualHost *:80>
ServerName laravel.example.com
DocumentRoot /var/www/blog/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/blog>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
然後
a2ensite laravel.example.com
並重裝Apache和添加"127.0.0.1 laravel.example.com" >> /etc/hosts
現在,當我去http://laravel.example.com打印index.php的源代碼
也許你的php沒有啓用。 – follio
看起來你在你的配置中有一個php錯誤,你的php版本是什麼? – Derek
結帳:http://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page – Derek