简体   繁体   中英

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. 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.

I moved all my folders from public to the hunterlp root folder and placed a .htaccess with the following in

<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?

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

Hope this is works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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