简体   繁体   English

内部500错误laravel 5.2

[英]Internal 500 error laravel 5.2

I have a domain say www.example.com and on the root of the domain I have a folder called development. 我有一个域名www.example.com,在域的根目录我有一个名为development的文件夹。 Inside development I have a folder called hunterlp and inside the hunterlp folder all my laravel files are placed when I navigate to http://www.example.com/development/hunterlp/ i am greeted by a 500 internal server error. 在开发内部我有一个名为hunterlp的文件夹,在hunterlp文件夹中,当我导航到http://www.example.com/development/hunterlp/时,所有我的laravel文件都被放置了。我遇到了500内部服务器错误。

I moved all my folders from public to the hunterlp root folder and placed a .htaccess with the following in 我将所有文件夹从公共文件移动到hunterlp根文件夹,然后放入.htaccess,其中包含以下内容

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

Options +FollowSymLinks
RewriteEngine On

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

How can I make my laravel site work in that folder? 如何让我的laravel网站在该文件夹中工作?

please follow this instruction its work for you 请按照此说明为您工作

1. connect to hosting via SSH

2. install composer

3. in cpanel open Select PHP version and choose 5.4. (I also set phar extension)

4. install laravel: php composer.phar create-project laravel/laravel myproject --prefer-dist

5. copy everything from myproject/public to public_html

6. open public_html/index.php and set:

7. require __DIR__.'/../myproject/bootstrap/autoload.php';

8. $app = require_once __DIR__.'/../myproject/bootstrap/start.php';

for the 7 and 8 steps give the path where you source has so that file find that files 对于7和8步,给出源所在的路径,以便文件找到该文件

Hope this is works. 希望这是有效的。

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

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