E
E
Evgeny2019-09-04 04:07:33
Apache HTTP Server
Evgeny, 2019-09-04 04:07:33

How to run Laravel 5.8 on regular hosting with Apache server?

Hello! I started to deal with Laravel and all sorts of composers. I made a site and uploaded it to the hosting (on reg), when I go to the site, I get a server error 500. Despite the fact that everything works fine on local hosting.
The .htaccess file contains the following settings:

DirectoryIndex /public/index.php
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+) $1 [L]

RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^(.+) /public/$1 [L]

Options +SymLinksIfOwnerMatch
RewriteRule ^(.*)$ /public/ [QSA,L]

But when launched on a hosting, this file does not seem to perform its function. My site is simple, the database is not connected. Just a couple of pages, there is not even a feedback form, the only thing that is there is switching the language from English to Russian. But I do not think that this can be the case, but just in case I say.
What could be the reason? Tell me please. I will be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2019-09-04
@Vagrant0610

RewriteEngine On
RewriteRule ^(.*)$ public/$1

If ISPmanager is hosted, when creating a www-domain, you can immediately specify the public home directory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question