0

I am trying to deploy a Laravel application on Hostinger - how can I go about it? I tried using the deployment method of 000webhostapp on it because they are somehow alike but it ended up giving me

Error 500 response

I followed the procedures from this page to host it on Hostinger but it ended up giving me

Error 500

https://www.000webhost.com/forum/t/deploy-laravel-project-into-000webhost-site/127323

1

2 Answers 2

3

I don't know if this still needed since it's an old thread, however, if anybody will reach this question you have two options:

  1. Put all folders outside public_html (one level above) and put your public/ folder's content to public_html only. Make sure the index.php path is correct.
  2. Put all folders inside public_html. Create .htaccess file in public_html (if there is no any) and paste this code to make public/ folder as a default:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

If paths are set correctly, both methods will work on Hostinger Shared and Cloud plans.

Sign up to request clarification or add additional context in comments.

1 Comment

Again after long time if i have folder structure like this main-domain sub-domain-1 sub-domain-2 inside public_html then how to point to main domain with correct url. i mean without /main-domain/public
0

The guide you referenced is the most awful guide I've ever seen, follow this instead.

https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.