토모키

nginx phpmyadmin 403 흰 화면

[NGINX]
  • 조회 : 1,323 / 댓글 : 0

 

오류 증상  

1. 접속 시 아무 것도 안 뜨고 빈화면이다. (오류로그도 안 찍힌다.)

2. 403 오류로 권한이 없다고 뜬다.

3. 상단에 빨갛게 아래와 같은 문구가 뜬다.

Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. 

 

해결 방법 

nginx 초기 설치하고, 설정 안 한 상태에서 이것저것 만지다가

나중에 /etc/php-fpm.d/www.conf 파일에서 apache에서 nginx으로 설정을 변경했다면...

user = nginx
group = nginx 

생성된 폴더 소유권이 apache 되어있는 것을, nginx으로 변경해줘야한다. 

 

위치 이동
​[root@localhost ~]# cd /var/lib/php 

 

디렉토리내 소유권 확인하면 root apache 으로 되어있다.
[root@localhost php]# ll
합계 4
drwxrwx---. 2 root apache    6 11월  1 16:23 opcache
drwxrwx---. 2 root apache 4096 11월 18 16:56 session
drwxrwx---. 2 root apache    6 11월  1 16:23 wsdlcache

 

nginx 으로 소유권을 변경하자 

[root@localhost php]# chown -R root:nginx *

 

다시 소유권 확인 

[root@localhost php]# ll
합계 4
drwxrwx---. 2 root nginx    6 11월  1 16:23 opcache
drwxrwx---. 2 root nginx 4096 11월 18 16:56 session
drwxrwx---. 2 root nginx    6 11월  1 16:23 wsdlcache
 

  • 비회원
  • 작성자
  • 비밀번호
  • 취소

대댓글 작성

비밀번호를 입력하세요.

비밀번호