我在Laravel有一个网站,在这里工作得很好:
http://beta.modernassemb.ly但是当我把它移动到:
http://modernassemb。实际上,它只是显示一个空白屏幕(一切都是一样的)
我甚至不知道如何去调试这个,因为标准的调试屏幕没有出现。错误日志显示:
[Mon Jun 16 00:36:56 2014] [error] [client 222.239.78.246] File does not exist: /var/www/198.211.105.63
其中198.211.105.63
为站点的IP。
当我在索引控制器中回显语句时,它们显示出来,但模板/视图没有明显渲染。
服务器上的路径为:
working: /var/www/beta.modernassemb.ly/public_html
不工作: /var/www/modernassemb.ly/public_html
我试着建立一个软链接,所以/var/www/198.211.105.63
指向/var/www/modernassemb.ly
无效。
我的apache配置文件是这样的:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName modernassemb.ly
VirtualDocumentRoot /var/www/%0/public_html
ServerAlias *.modernassemb.ly
DocumentRoot /var/www/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www'.modernassemb'.ly$ [NC]
RewriteRule ^(.*)$ http://modernassemb.ly$1 [R=301,L]
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory "/var/www">
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
请帮忙,因为这快把我逼疯了!
chmod -R 777 app/storage
修复了(传输文件不传输文件夹权限)。希望错误消息传递能好一点!
在Laravel 5中新的文件结构storage/文件夹位于app/文件夹之外
$ sudo chmod -R o+w storage/