₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,345,005 members, 8,514,967 topics. Date: Saturday, 07 November 2026 at 06:36 PM

Toggle theme

How Do You Deploy Laravel Lumen 5.7 On The Server - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › How Do You Deploy Laravel Lumen 5.7 On The Server (1131 Views)

1 Reply (Go Down)

How Do You Deploy Laravel Lumen 5.7 On The Server by cbrass(op): 6:26pm On Feb 04, 2019
Hello guys, have you used Lumen 5.7? Please how did you set it up to work on a shared server. I am having trouble with it
Re: How Do You Deploy Laravel Lumen 5.7 On The Server by makavele: 11:10pm On Feb 04, 2019
cbrass:
Hello guys, have you used Lumen 5.7? Please how did you set it up to work on a shared server. I am having trouble with it
Just like any other flavor/package of Laravel,
you can deploy on shared hosting.
Just make sure the hosting account has SSH access.

What is the problem you are facing to be precise?
Re: How Do You Deploy Laravel Lumen 5.7 On The Server by cbrass(op): 12:46am On Feb 05, 2019
makavele:
Just like any other flavor/package of Laravel,
you can deploy on shared hosting.
Just make sure the hosting account has SSH access.

What is the problem you are facing to be precise?
it keeps saying "this site can not be reached" and in the error logs in the public folder i get
PHP Parse error: syntax error, unexpected '=' in /home2/lilyserv/public_html/lumen/vendor/illuminate/config/Repository.php on line 68

i have tried

RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L] but still wont work ,

i aslo tried but wont work

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]


the PHP version is 7.2 , the Lumen version is also 5.7, so i can't

by the way can you put me through that SSH thing
Re: How Do You Deploy Laravel Lumen 5.7 On The Server by makavele: 12:14pm On Feb 05, 2019
It says you have a syntax error; you might as well want to check the Repository.php file and paste the contents here in quotes.

a better .htaccess file (to be put in root folder of project)

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

RewriteEngine On

# 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]

RewriteRule ^.env - [F,L,NC]

</IfModule>
Finally, like you already know artisan cli commands are run via the terminal. Thus, you need ssh access
to be able to replicate such commands in production. It would be a pain
to always run production locally before shipping to "server"
Re: How Do You Deploy Laravel Lumen 5.7 On The Server by cbrass(op): 7:49am On Feb 06, 2019
makavele:
It says you have a syntax error; you might as well want to check the Repository.php file and paste the contents here in quotes.

a better .htaccess file (to be put in root folder of project)



Finally, like you already know artisan cli commands are run via the terminal. Thus, you need ssh access
to be able to replicate such commands in production. It would be a pain
to always run production locally before shipping to "server"
Thank you bro, i already sorted it out, it was an htaccess issue
1 Reply

The Night The Server Crashed • The Night The Server Crashed • The Night The Server Refused To Sleep • 2 • 3 • 4

Get Your Business Logo(easter Promo) • Programming And Cyber Security. • Miracle Godwin Chinemerem Is A Scammer And Hardened Criminal.