2

I was wondering if anyone has had any experience deploying larval to blue host? I was flowing an youtube tutorial that showed how to deploy a larval application to a shared hosting service. It was using Godaddy.com, however, i was using Bluehost, and it didn't work as expected. However I managed to getting to not return an internal server error.

What I did was to configure the .env file so that it had my correct database information and my APP_URL to point to my domain.

The youtube tutorial said I should also remove everything from the public folder and place it in the applications main folder, which on Bluehost is the public_html folder. I also changed the .htaccess and removed the public in the rewrite that handles the redirects for trailing slashed.

Now, when I point to my website, all that is served up is a blank screen. but something seems to be working because I uploaded an html webpage that renders to the browser. I just wondering where do I go from here to get the entire site running.

i'm using php 5.6.

Any help would be great. Thank you

Ryan Alvi
  • 13
  • 8
Kaley36
  • 233
  • 9
  • 19
  • I should also mention that I am using larval 5.3 and I did change the index.php page to reflect where the bootstrap/autoloader.php is since I moved everything from the public folder to the main folder. – Kaley36 Dec 06 '16 at 15:39

3 Answers3

0

I think you are using shared hosting

Follow these steps 1: After upload files to public_html move all your /public files in public_html folder All files like index.php, .htaccess and assets folder etc

2: Find the following line in index.php

require __DIR__.’/../bootstrap/autoload.php’;
require __DIR__.’/../project/bootstrap/autoload.php’;

change to

require __DIR__.’/bootstrap/autoload.php’;
require __DIR__.’/project/bootstrap/autoload.php’;

That’s it. Well then, have fun.

M Arfan
  • 4,384
  • 4
  • 29
  • 46
0

check that the PHP version is correct for Laravel

in cPanle enable FastCGI for PHP


open file .htaccess located in /public and edit

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

    RewriteBase /public/

# For security reasons, Option followsymlinks cannot be overridden.
#   Options +FollowSymLinks
    Options +SymLinksIfOwnerMatch
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
0

This is my .htaccess codes which are different in different server.

#Default Setup

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit


//bluehost------------

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

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

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Pri Nce
  • 576
  • 6
  • 18