简体   繁体   English

Laravel 500内部服务器错误?

[英]500 internal server error on laravel?

I made a project in laravel and when I migrated to a live server it gives me 500 internal error. 我在laravel中创建了一个项目,当我迁移到实时服务器时,它给了我500个内部错误。

This is the first time I try to install laravel. 这是我第一次尝试安装laravel。

The problem occurs when I run rm -rf public_html AND ln -s laravel/public/ public_html 当我运行rm -rf public_html AND ln -s laravel/public/ public_html时,会发生问题

This is the error log: 这是错误日志:

[Sat Nov 08 12:57:46 2014] [notice] Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 configured -- resuming normal operations
[Sat Nov 08 12:58:01 2014] [error] [client IP ADDRESS ] SoftException in Application.cpp:357: UID of script "/home/%STACK%/public_html/index.php" is s$
[Sat Nov 08 12:58:01 2014] [error] [client IP ADDRESS ] Premature end of script headers: index.php
[Sat Nov 08 12:58:01 2014] [error] [client IP ADDRESS ] SoftException in Application.cpp:357: UID of script "/home/%STACK%/public_html/index.php" is s$
[Sat Nov 08 12:58:01 2014] [error] [client IP ADDRESS ] Premature end of script headers: index.php
[Sat Nov 08 13:03:27 2014] [error] [client IP ADDRESS ] SoftException in Application.cpp:357: UID of script "/home/%STACK%/public_html/index.php" is s$
[Sat Nov 08 13:03:27 2014] [error] [client IP ADDRESS ] Premature end of script headers: index.php
[Sat Nov 08 13:03:27 2014] [error] [client IP ADDRESS ] File does not exist: /home/%STACK%/public_html/500.shtml
[Sat Nov 08 13:07:00 2014] [error] [client IP ADDRESS ] SoftException in Application.cpp:357: UID of script "/home/%STACK%/public_html/index.php" is s$
[Sat Nov 08 13:07:00 2014] [error] [client IP ADDRESS ] Premature end of script headers: index.php
[Sat Nov 08 13:07:00 2014] [error] [client IP ADDRESS ] File does not exist: /home/%STACK%/public_html/500.shtml
[Sat Nov 08 13:09:02 2014] [error] [client IP ADDRESS ] SoftException in Application.cpp:357: UID of script "/home/%STACK%/public_html/index.php" is s$
[Sat Nov 08 13:09:02 2014] [error] [client IP ADDRESS ] Premature end of script headers: index.php

Change the permissions of your app/storage folder to 755 if that doesn't works change it to 777. If you are running nginx on the server check /etc/nginx/nginx.conf file and check the first which states the user running nginx and then 如果不起作用,请将您的app / storage文件夹的权限更改为755,将其更改为777。如果您在服务器上运行nginx,请检查/etc/nginx/nginx.conf文件,并检查第一个指出用户正在运行nginx的文件接着

chown -R www-data:www-data /your/document/root/public_html/

change www-data by the user name you found in config file you can also validate it by running ps on terminal 通过在配置文件中找到的用户名更改www-data,也可以通过在终端上运行ps来验证它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM