Lỗi 403 Forbidden sau khi cài SSL theo hướng dẫn của học vps


(manhtaile) #1

Mình bị lỗi không đăng nhập vào hocvps script sau khi đã cài thành công chứng chỉ ssl let encrypt. Mong AD giúp em với.
phần SSL port của em đây:
server {
listen 2259 ssl;

access_log        off;
log_not_found     off;
error_log /home/giacongmyphamcaocap.com/logs/nginx_error.log;

	root /home/giacongmyphamcaocap.com/private_html;
index index.php index.html index.htm;
	server_name giacongmyphamcaocap.com;

    error_page 497 https://$server_name:$server_port$request_uri;

ssl_certificate /etc/letsencrypt/live/giacongmyphamcaocap.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/giacongmyphamcaocap.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
ssl_prefer_server_ciphers on; 
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

auth_basic "Restricted";
auth_basic_user_file /home/giacongmyphamcaocap.com/private_html/giacongmyphamcaocap/.htpasswd;

 	location / {
	autoindex on;
	try_files $uri $uri/ /index.php;
}

	location ~ \.php$ {
	fastcgi_split_path_info ^(.+\.php)(/.+)$;
    	include /etc/nginx/fastcgi_params;
    	fastcgi_pass 127.0.0.1:9000;
    	fastcgi_index index.php;
	fastcgi_connect_timeout 1000;
	fastcgi_send_timeout 1000;
	fastcgi_read_timeout 1000;
	fastcgi_buffer_size 256k;
	fastcgi_buffers 4 256k;
	fastcgi_busy_buffers_size 256k;
	fastcgi_temp_file_write_size 256k;
	fastcgi_intercept_errors on;
    	fastcgi_param SCRIPT_FILENAME /home/giacongmyphamcaocap.com/private_html$fastcgi_script_name;
	}

location ~ /\. {
	deny all;
}

}