У меня есть проект в Laravel 4. Это на битбакете. Я загрузил его из своего репо на моем локальном компьютере, разбил локальный виртуальный хост, работая отлично. Но когда я клонировал тот же проект на своем сервере и создал виртуальный хост, отображается 500 Internal Server Error. В том же домене другой виртуальный хост для одного и того же проекта в laravel 5 работает нормально.500 Внутренняя ошибка сервера Laravel 4
Это мой виртуальный код хост-файл для проекта Laravel 4:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName l4.mydomain
ServerAlias l4.mydomain
DocumentRoot /var/www/L4/public
<Directory /var/www/L4/public/>
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Это .htaccess код проекта Laravel 4:
IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
</IfModule>
Я также изменил «index.php '644 разрешения, но не работал
Это предупреждение и ошибка содержится в файле журнала:
PHP Warning: require(/var/www/myproject/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/L4/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/var/www/myproject/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/L4/bootstrap/autoload.php on line 17
Посмотрите на журнал ошибок apache. В нем будет подробное сообщение о том, что не так. –
Где найти журнал apache? – MKJ
Это зависит от вашей системы. Посмотрите на конфигурацию apache как '$ {APACHE_LOG_DIR}'. –