@ddiaz2380 it should look like this
server {
listen 80;
listen 443 ssl;
server_name mysite.org;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/mysite.org;
#SSL-START SSL related configuration, do NOT delete or modify the next line of commented-out 404 rules
#error_page 404/404.html;
limit_conn perserver 300;
limit_conn perip 25;
limit_rate 512k;
#HTTP_TO_HTTPS_START
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
#HTTP_TO_HTTPS_END
ssl_certificate /www/server/panel/vhost/cert/mysite.org/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/mysite.org/privkey.pem;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https://$host$request_uri;
#SSL-END
#ERROR-PAGE-START Error page configuration, allowed to be commented, deleted or modified
#error_page 404 /404.html;
#error_page 502 /502.html;
#ERROR-PAGE-END
#PHP-INFO-START PHP reference configuration, allowed to be commented, deleted or modified
#SECURITY-START Hotlink protection configuration
location ~ .*\.(jpg|jpeg|gif|png|js|css)$
{
expires 30d;
access_log off;
valid_referers none blocked mysite.org;
if ($invalid_referer){
return 404;
}
}
#SECURITY-END
include enable-php-74.conf;
#PHP-INFO-END
#REWRITE-START URL rewrite rule reference, any modification will invalidate the rewrite rules set by the panel
include /www/server/panel/vhost/rewrite/mysite.org.conf;
#REWRITE-END
# Forbidden files or directories
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
# Directory verification related settings for one-click application for SSL certificate
location ~ \.well-known{
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log off;
access_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
access_log off;
}
access_log /www/wwwlogs/mysite.org.log;
error_log /www/wwwlogs/mysite.org.error.log;
## the new config starts here.
autoindex off;
location / {
try_files $uri $uri.html $uri/ @hide-php-ext /index.php?$query_string;
index index.html index.htm index.php;
}
location @hide-php-ext {
rewrite ^(.*)$ $1.php last;
}
location ~ \.php$ {
try_files $uri =404;
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_pass php_farm;
fastcgi_hide_header X-Powered-By;
}
## the new config ends here
}