aaPanel_Kern
server {
listen 80;
listen 443 ssl http2;
server_name www.bookbox.com bookbox.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/bookbox.com;
# SSL configuration
# Redirect HTTP to HTTPS
# Redirect rules
include /www/server/panel/vhost/nginx/redirect/bookbox.com/*.conf;
# Error pages
# error_page 404 /404.html;
# error_page 502 /502.html;
# PHP configuration
include enable-php-80.conf;
# URL rewrite rules
include /www/server/panel/vhost/rewrite/bookbox.com.conf;
# Forbidden files or directories
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) {
return 404;
}
# Directory verification for SSL certificates
location ~ \.well-known {
allow all;
}
# Static file caching
location ~ .*\.(gif|jpg|jpeg|png|bmp|webp|swf)$ {
expires 360d;
error_log /dev/null;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 12h;
error_log /dev/null;
access_log off;
}
# Ajax requests
location /ajax {
try_files $uri $uri/ /index.php$is_args$args;
}
access_log /www/wwwlogs/bookbox.com.log;
error_log /www/wwwlogs/bookbox.com.error.log;
}
This is our configuration