VPS를 다른 디렉토리로 옮긴 후 403 발생

VPS를 다른 디렉토리로 옮긴 후 403 발생

/home/admin/웹사이트를 구축한 후 모든 공간이 폴더 에 할당되도록 RAID가 설정되어 있다는 것을 깨달았습니다 .

그런 이유로 나는 내 웹사이트를 모두 에서 로 복사 /var/www/했습니다 /home/admin/www/. 또한 다음과 같이 디렉토리를 chmodded했습니다.

sudo chown -R root:root /home/admin/www/website.com/public_html

sudo chmod 755 /home/admin/www

그런 다음 nginx를 다시 시작했고 모든 시스템이 녹색으로 표시되었지만 이제 내 웹 사이트에 액세스할 때 403 오류가 발생합니다.

여기 나의virtual.conf파일:

server {
    listen       80;
#    listen       *:80;
    server_name  website.com www.website.com;
    access_log   /home/admin/www/html/website.com/public_html/access.log;
    error_log    /home/admin/www/html/website.com/public_html/error.log;

    location / {
        root   /home/admin/www/html/website.com/public_html;
         index  index.php index.html index.htm;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /home/admin/www/html/website.com/public_html$fastcgi_script_name;
    }

}


server {
    listen       80;
#    listen       *:80;
    server_name  website2.com www.website2.com;

    location / {
        root   /home/admin/www/html/website2.com/public_html/;
         index  index.php index.html index.htm;
    }
}

감사해요!

관련 정보