Coder Social home page Coder Social logo

marouanesh / laravel5_on_shared_hosting_without_ssh Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 221 KB

Laravel project configured for deployment on shared Hosting without use SSH by Marouane Souah.

ApacheConf 0.85% PHP 94.88% Vue 0.73% HTML 3.55%

laravel5_on_shared_hosting_without_ssh's Introduction

Deploy Laravel Project on your shared Hosting wihout Use SSH

Laravel 5.4 project configured for deployment on shared Hosting without use SSH by Marouane Souah.

Feautures

  • Fixed Storage Link problem
  • Secure your .env file , and deny anyone from access to it.
  • .htaccess protection
  • Upload your project with FTP

Instruction

  • Firstly you need to clone this project , open your cmd and type
    git clone https://github.com/MarouaneSH/Laravel5_On_Shared_Hosting_without_SSH
  • After downloading has finished you need to rename the folder Laravel5_On_Shared_Hosting_without_SSH for anything you want (just for have a short name) for example myLaravelApp
  • Open your cmd again in the current folder (myLaravelApp) and type cd myLaravelApp\project
  • Now you must run composer , type on your cmd composer install
- Note : if you had any issues during installing composer please run `composer install --prefer-source` that`s will fixe the issue
  • After composer instlation finished , you must run php artisan key:generate.

How to use

So know after project instalation are completed you can put your project folder on your localhost folder , I'm using XAMPP so i will put it on C:\xampp\htdocs , you can use what ever Windows web development environment you want .
#So know you can acces to your laravel project like any other PHP project , http://localhost/myLaravelApp/

- Note : php artisan serve , will not work in this project

How to Store files

  • i have already created a driver in filesystems.php that allow you to store files in a public assets folder
    you can use Storage::disk("assets")->put("file.txt","Some Content"); .
  • to get the link of a stored files you can use two function :
+ Asset_url("filename") 
+ OR Asset_path("filename")

For example :
-Asset_url("file.txt") will give you http://youAppUrl.com/assets/file.txt
-Asset_path("file.txt") will give you assets/file.txt

- Note : You must change APP_URL in your .env FILE

Some problems that you may have

For some reason , if you create some route on your project and you want to access to it , maybe it will not work .
There is some solution for that :
-if you type http://localhost/myLaravelApp/myRoute it will not work , but if you changet to http://localhost/myLaravelApp/index.php/myRoute it will be work fine .

- Note : This problem only show on your windows local development , if youre using Linux or your uplouaded the project to a Shared Hosting , it will be work fine.

-The other solution is to enable AllowOverride in your php.ini , there is a link show you how you can do that http://www.anmsaiful.net/blog/php/enable-apache-rewrite-module.html

laravel5_on_shared_hosting_without_ssh's People

Contributors

marouanesh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.