S
S
Sergey Bard2017-10-04 16:01:45
Laravel
Sergey Bard, 2017-10-04 16:01:45

How to migrate laravel to server?

Hello. I can’t solve the problem with transferring laravel to the server in any way, I tried different options, namely
1) I copied everything from the public folder to "/www/mysite.com/tools/check-tag/" I make a microservice in the folder of one of the sites (on the server I have several sites in the public_html folder), so I copied it all and commented out these lines in .htaccess

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

then to the root of the server i.e. in a folder that is a level higher than "www" filled in a folder called laravel in which everything else was.
After that, I fixed the paths in "/www/mysite.com/tools/check-tag/index.php" to the correct ones (The paths are definitely correct because I thought that the problem was in them and checked everything manually, in general, it took me a long time to write how I did it did, but the paths are 100% correct) and after all this, when I try to access the site, I get HTTP ERROR 500, and in the server logs there are these lines
2017/10/04 15:55:02 [crit] 17216#0: *119430760 open() "/var/www/mysite/data/www/mysite.com/does_not_exists" failed (13: Permission denied), client: XXX.XXX.XXX.XXX, server: mysite.com, request: "GET /tools/check-tag/ HTTP/1.1", host: "mysite.com
[Wed Oct 04 15:55:02 2017] [error] [client XXX.XXX.XXX.XXX] PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/mysite/data/www/mysite.com/tools/check-tag/index.php on line 5

2017/10/04 15:27:19 [crit] 17219#0: *119416818 open() "/var/www/mysite/data/www/mysite.com/does_not_exists" failed (13: Permission denied), client: XXX.XXX.XXX.XXX, server: mysite.com, request: "GET /tools/weblist/ HTTP/1.1", host: "mysite.com
2017/10/04 15:20:36 [crit] 17218#0: *119412845 open() "/var/www/mysite/data/www/mysite.com/does_not_exists" failed (13: Permission denied), client: XXX.XXX.XXX.XXX, server: mysite.com, request: "HEAD / HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com
[Wed Oct 04 15:20:36 2017] [error] [client XXX.XXX.XXX.XXX] PHP Notice:  Undefined variable: item in /var/www/mysite/data/www/mysite.com/index.php on line 135, referer: http://mysite.com
[Wed Oct 04 15:20:36 2017] [error] [client XXX.XXX.XXX.XXX] PHP Notice:  Trying to get property of non-object in /var/www/mysite/data/www/mysite.com/index.php on line 135, referer: http://mysite.com


2) The second option is to simply move everything to "/www/mysite.com/tools/check-tag/" and add .htaccess with this content to the root
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^ public/index.php [L]

and in public/.htaccess just comment out Options -MultiViews Please help me

find a solution to this problem.
Ps if it's important - use ISP manager

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2017-10-04
@serg_small_developer

It seems to me that different versions of php use the old place != new.
To avoid such problems + to make it more convenient to work and transfer, I recommend using Docker.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question