Laravel 4에 프로젝트가 있습니다. 그것은 bitbucket에 있습니다. 내 로컬 컴퓨터의 저장소에서 다운로드하고 로컬 가상 호스트를 생성했으며 제대로 작동합니다. 그러나 서버에서 동일한 프로젝트를 복제하고 가상 호스트를 만들면 500 내부 서버 오류가 표시됩니다. 동일한 도메인에서 laravel 5의 동일한 프로젝트에 대한 다른 가상 호스트가 제대로 작동합니다.
이것은 laravel 4 프로젝트의 가상 호스트 파일 코드입니다.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
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
이것은 laravel 4 프로젝트의 .htaccess 코드입니다.
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
당신이 얻는다면
"PHP Fatal error: require(): Failed opening required '/var/www/L4/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/L4/bootstrap/autoload.php on line 17"
오류 로그에서 서버에서 작곡가 설치를 실행하지 않은 것 같습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다