Nginx 설정 phpMyAdmin
[root@localhost nginx]# chown -R nginx:nginx /usr/local/nginx/html/phpMyAdmin
[root@localhost nginx]# ll -d /usr/local/nginx/html/phpMyAdmin
drwxrwxrwx. 12 nginx nginx 4096 8 9 14:34 /usr/local/nginx/html/phpMyAdmin
2 새 프로필 / usr / local / nginx / conf / conf. d / php - my - admin. conf
server {
listen 80;
server_name php-my-admin.localhost;
#access_log logs/host.access.log main;
root /usr/local/nginx/html/phpMyAdmin;
location / {
index index.html index.htm index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
3 파일 속성 수정
[root@localhost conf.d]# ll /usr/local/nginx/conf/conf.d/php-my-admin.conf
-rw-r--r--. 1 nginx nginx 485 8 9 14:38 /usr/local/nginx/conf/conf.d/php-my-admin.conf
4 수정 / usr / local / nginx / conf / nginx. conf, 끝 에 더하기
include /usr/local/nginx/conf/conf.d/*.conf;
5 프로필 다시 불 러 오기
[root@localhost conf.d]# nginx -s reload
[root@localhost conf.d]# service php-fpm reload
6. / etc / hosts 파일 에 한 줄 추가
127.0.0.1 php-my-admin.localhost
7 / usr / local / nginx / error. log 알림 에 권한 이 없 으 면 seLinux 를 닫 아야 할 수도 있 습 니 다.
#
[root@localhost conf.d]# getenforce
Disabled
[root@localhost conf.d]# /usr/sbin/sestatus -v
SELinux status: disabled
#
# SELinux permissive
#setenforce 1 SELinux enforcing
[root@localhost conf.d]# setenforce 0
#
[root@localhost conf.d]# vim /etc/selinux/config
# SELINUX=enforcing SELINUX=disabled
#
#SELINUX=enforcing
SELINUX=disabled