简体   繁体   中英

How to host Laravel 5.2 in GoDaddy shared hosting without SSH?

I have developed a web application in Laravel 5.2. I want to host it in Godaddy Shared hosting in a sub folder, because I have other projects there for different domains.

I'm not sure if I explained it clearly, this is what I'm trying to achieve.

I have put all my Laravel files in a sub folder like (www.mylaravelapp.com/test).

Now I can access the application with this URL "www.mylaravelapp.com/test/public".

public_html/
  some_domain_folder/  
  www.mylaravelapp.com/
     test/
        app/
        bootstrap/
        config/
        database/
        public/
        etc..

How can I access this with a URL like "www.mylaravelapp.com/"?

How to solve security issues too?

First of all you have to allow hosting two sites in GoDaddy's cpanel. If you have access then you have to do the following things.

  1. Goto this link , it is a guide to add add-on domains, and add your domain ( www.mylaravelapp.com ) as add-on domain.
  2. It will create another folder in your root directory like mylaravelapp .
  3. Then copy the contents of the test directory into the mylaravelapp directory.
  4. Now the structure is like this:

Folders

   |`-- public_html
     |-- some_domain_folder
     |`-- mylaravelapp
        |`-- app
        |`-- config
        |`-- bootstrap
        |`-- database
        |`-- public

Now go to the public folder and move index.php and .htaccess to mylaravelapp .

Hope this helps.

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