In aaPanel “Multi-WebServer” setups, Nginx is usually in front and OpenLiteSpeed (OLS) is behind it. WP Ghost needs certain requests to reach the backend correctly, but a common issue is this:
The fix is to add a smart rule in Nginx:
If a static-looking file exists, serve it normally. If it does not exist, forward it to OpenLiteSpeed so the rewrite rules can apply.
To make this easy, download, unpack and use the following script.
/www/wwwroot/yourdomain.com/)cd /www/wwwroot/yourdomain.com chmod +x openlitespeed.sh Run it like this:
./openlitespeed.sh Optional: run it only for one domain (useful if you host many sites):
./openlitespeed.sh yourdomain.com When it finishes, you should see messages like:
That means the fix is applied.
Think of it like a “traffic director” between Nginx and OpenLiteSpeed.
Here is what it changes, in plain terms:
/www/server/panel/vhost/nginx/*.conf/www/server/panel/vhost/nginx/extension/<domain>/static-fallback.confnginx -t to ensure config is validIt also makes backups of the snippet if it already exists (adds a .bak.<timestamp> copy).
After running the script and the NGINX server restarts:
If you use caching (LiteSpeed Cache, Cloudflare, other CDN), clear cache once to avoid old asset paths being served.
This fix does not “replace” OpenLiteSpeed or change WordPress.
It simply ensures that when WP Ghost uses rewritten URLs, the request reaches the right server layer so the rewrite can be applied instead of being blocked as a missing file.
You are not in the correct folder, or it is not executable.
Run:
cd /www/wwwroot/yourdomain.com
chmod +x openlitespeed.sh
./openlitespeed.sh
This usually means:
The script checks for common aaPanel paths and will stop safely if they are missing.
If aaPanel’s nginx service is not active, the script tries alternative reload methods (reload, then restart if needed).
If it still fails, open aaPanel, App Store > confirm Nginx is installed and running
Because hackers often use bots to search for security flaws in your website, it is…
The easiest way to change the default media uploads path is to use the WP…
To hide all CSS and JS you need to follow the steps to Combine the…
https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…
The security of your WordPress site depends on multiple factors, such as the strength of…
When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…