LEMP server - NGINX, MariaDB, PHP 7.1

yum remove -y httpd
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y yum-utils nano wget
yum-config-manager --enable remi-php71
yum -y update
adduser wwwuser
passwd wwwuser
nano /etc/yum.repos.d/mariadb.repo
# MariaDB 10.1 CentOS repository
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install -y phpmyadmin php php-mysqlnd php-fpm nginx MariaDB-server MariaDB-client php-opcache
systemctl restart mariadb.service
/usr/bin/mysql_secure_installation
systemctl enable nginx.service
systemctl start nginx.service
systemctl enable php-fpm.service
systemctl start php-fpm.service
chown -R wwwuser:wwwuser /var/lib/php/session /usr/share/nginx
/usr/sbin/usermod -d /usr/share/nginx/html wwwuser
ln -s /usr/share/phpMyAdmin /usr/share/nginx/html
nano /etc/php-fpm.d/www.conf
user = wwwuser
group = wwwuser
listen.owner = wwwuser
listen.group = wwwuser
nano /etc/nginx/nginx.conf
Onder access log:
sendfile            on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
open_file_cache max=2000 inactive=20s;
open_file_cache_valid 60s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;

# note that these lines are originally from the "location /" block
# root /usr/share/nginx/html;
root /var/www/yourdomain.com/htdocs;
index index.php index.html index.htm;

location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
include fastcgi_params;
}
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 30d;
}
}
nano /etc/php.d/10-opcache.ini
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.fast_shutdown=1
opcache.validate_timestamps=1
opcache.revalidate_freq=60
opcache.use_cwd=1
opcache.max_accelerated_files=100000
opcache.max_wasted_percentage=5
opcache.memory_consumption=512
opcache.consistency_checks=0
opcache.huge_code_pages=1
reboot