F
F
foduvem2017-03-01 00:54:27
Nginx
foduvem, 2017-03-01 00:54:27

Moving from lighttpd + mariadb 5.x to nginx + php-fpm + mariadb 10.x - how to make it work?

Previously, there was lighttpd on centos 7.X, everything worked correctly.
Now I have nginx 1.10 with ubuntu 16.04.
Zabbix works correctly, goes through all directories. Directory navigation does not work for other web resources - instead it returns a 404 value, that is, the main page is displayed, and all subsequent ones with a 404 value.
Nginx config:

server {
root /var;
index index.php index.html index.htm;
server_name my_site;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}

We moved like this:
tar -cvvf test.tar ./
​​vsftpd -> filezilla -> windows -> htt p
wget
tar -xvvf test.tar

mysqldump -u root -p dumpdb > dumpfile.sql
mysql -u root -p
CREATE DATABASE `db_name` CHARACTER SET utf8 COLLATE utf8_general_ci;
exit
mysql -u root -p db_name <dumpfile.sql

Logs:
2017/03/01 02:19:53 [error] 25546#25546: *1 "/home/www/test/test2/index.php" is not found (2: No such file or directory), clie$
2017/03/01 02:19:55 [error] 25546#25546: *2 "/home/www/test/test3/index.php" is not found (2: No such file or directory), client: IP_ADDRESS, server: zom$

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SimBioT19, 2017-03-01
@SimBioT19

location / {
            try_files $uri $uri/index.php /index.php
  }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question