HomeHostingDirectAdminDirectAdmin – Access to the script ‘/home/…/index.phtml’ has been denied (see security.limit_extensions)

DirectAdmin – Access to the script ‘/home/…/index.phtml’ has been denied (see security.limit_extensions)

by Quốc Cường
1.129 views
Mục lục

    Log lỗi hiển thị:

    Access to the script '/home/domain/domains/domain.com/public_html/index.phtml' has been denied (see security.limit_extensions)

    Cách fix:

    Xác định phiên bản php mà website đang chạy. Ví dụ ở đây website mình đang chạy phiên bản php-fpm 5.6

    Chỉnh sửa php-fpm56.conf như sau, thay [username] bằng tên user trên VPS của bạn:

    vi /usr/local/directadmin/data/users/[username]/php/php-fpm56.conf

    Tiến hành thêm đuôi .phtml vào sau đó save lại.

    has been denied (see security.limit_extensions)

    Restart php-fpm

    Lưu ý: do php của mình là php-fpm56 nên cú pháp sẽ như bên dưới.

    systemctl restart php-fpm56

    Trong trường hợp các bạn dùng phiên bản php-fpm khác các bạn chỉ cần thay php-fpm[56] bằng phiên bản php của các bạn, ví dụ: php-fpm 7.4 có cú pháp như sau.

    systemctl restart php-fpm74

    Chúc các bạn thành công.

    You may also like

    Leave a Comment