d51e1b54bd
- docker-compose.yml: MariaDB 11 + WordPress 6.7 PHP8.3-FPM + Nginx - nginx/default.conf: FastCGI pass, security headers, cache headers - deploy.sh: one-command spin-up with WP-CLI install + plugin activation - migrate-from-cpanel.sh: import cPanel backup (SQL/tar.gz/zip) with URL rewrite - wordpress-plugins/falah-shortcodes: prayer times, dhikr, qibla, daily verse, nur/wallet/souq iframes - wordpress-plugins/hermes-ai-bridge: REST API bridge with plugin install/activate endpoints Migration path: cPanel → Contabo Docker (Imunify360 bypass)
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /var/www/html;
|
|
index index.php;
|
|
|
|
client_max_body_size 64M;
|
|
|
|
# Security headers
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
add_header X-Content-Type-Options nosniff;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_pass wordpress:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
fastcgi_read_timeout 300;
|
|
fastcgi_buffers 16 16k;
|
|
fastcgi_buffer_size 32k;
|
|
}
|
|
|
|
# WordPress uploads
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Block sensitive files
|
|
location ~ /\.(ht|git|env) {
|
|
deny all;
|
|
}
|
|
|
|
location = /xmlrpc.php {
|
|
deny all;
|
|
}
|
|
|
|
location /wp-json/ {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
}
|