我在Laravel有一个网站,在这里工作得非常好:
但当我尝试将其移至:
http://modernassemb.ly,它只显示一个空白屏幕(一切都相同)
我甚至不确定如何进行调试,因为标准调试屏幕没有出现。错误日志只显示:
[Mon Jun 16 00:36:56 2014] [error] [client 222.239.78.246] File does not exist: /var/www/198.211.105.63
IP 198.211.105.63
是网站的IP。
当我在索引控制器中回显语句时,它们会显示,但模板/视图显然不会呈现。
服务器上的路径是:
工作: /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>
请帮助,因为这让我发疯!
答案 0 :(得分:0)
chmod -R 777 app/storage
修复了它(传输文件没有传输文件夹权限)。希望错误消息传递更好一点!
答案 1 :(得分:0)
在Laravel 5中,新文件结构存储/ 文件夹位于 app / 文件夹
之外$ sudo chmod -R o+w storage/