Sau khi copy nội dung pate vào file /etc/nginx/conf.d/vpssim.demo.conf thì các web đã chạy lại ngon lành không bị lỗi nữa rồi ạ. Cảm ơn bác Oánh nhiều ạ.
Chú ý: Copy y nguyên và paste vào mới được. Nếu chỉ copy 1 phần và add thêm vào file etc/nginx/conf.d/vpssim.demo.conf đã sẵn có nội dung thì sẽ báo lỗi nginx:
server {
server_name www.vpssim.demo;
return 301 http://vpssim.demo$request_uri;
}
server {
listen 80 default_server;
access_log off;
error_log off;
# error_log /home/vpssim.demo/logs/error.log;
root /home/vpssim.demo/public_html;
include /etc/nginx/conf/ddos2.conf;
index index.php index.html index.htm;
server_name vpssim.demo;
#///////////////////////////////////////////////////////
#Run all the websites,if you use your rule, comment or delete the line below (AAA)
include /etc/nginx/conf/all.conf;
#If you use your rule, comment or delete above line, and Uncoment 3 lines belows and set your rule within it..
#location / {
#Uncomment 3 lines and set your rules here!
#}
#security, sql injection Propeller ....(uncoment if you want to use). Because some website plugins do not run with this config, so vpssim to turn off default
#include /etc/nginx/conf/block.conf;
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 150;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
include /etc/nginx/conf/staticfiles.conf;
#include /etc/nginx/conf/phpstatus.conf;
include /etc/nginx/conf/drop.conf;
}
server {
listen 34618;
access_log off;
log_not_found off;
error_log off;
root /home/vpssim.demo/private_html;
auth_basic "Authorization Required ( Get User & Password at /home/VPSSIM-manage-info.txt or Create new one by : VPSSIM menu -> Bao Mat Server & Website -> User & Password Mac Dinh )";
auth_basic_user_file /etc/nginx/.htpasswd;
index index.php index.html index.htm;
server_name vpssim.demo;
location / {
try_files $uri $uri/ /index.php;
}
location /nginx_status {
stub_status on;
access_log off;
}
location /php_status {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
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 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(bak|back|bk)$ {
deny all;
}
}
server {
listen 443 ssl default_server;
http2 on;
ssl_certificate /etc/vpssim/ssl/vpssim.demo.crt;
ssl_certificate_key /etc/vpssim/ssl/vpssim.demo.key;
ssl_session_timeout 4h;
ssl_session_tickets off;
ssl_prefer_server_ciphers on;
include /etc/nginx/conf/ssl-protocol-cipherV2.conf;
ssl_ecdh_curve X25519😛-256😛-384😛-224😛-521;
ssl_buffer_size 1400;
access_log off;
error_log off;
resolver 1.1.1.1 8.8.8.8 valid=300s;
resolver_timeout 10s;
root /etc/vpssim/menu/inc/ssldefaultpage;
include /etc/nginx/conf/ddos2.conf;
index index.php index.html index.htm;
server_name vpssim.demo;
include /etc/nginx/conf/all.conf;
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 150;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}