Search code examples
phpwordpress.htaccessvpslitespeed

Wordpress on OpenLiteSpeed CyberPanel get 404 error after VPS reboot


i get 404 error after reboot my vps that host wordpress using openlitespeed.

All version are latest using Digital Ocean Marketplace (just build today). My VPS run CyberPanel (Hosting Control Panel for LiteSpeed), so multiple website can host in my vps.

enter image description here

my effort so far:

  1. reboot litespeed using sudo service lsws restart
  2. change .htacess (on Wordpress /home/example.com/public_html) like below:
RewriteEngine On
RewriteBase /
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

but above steps cant solve the 404 error

Now, even access file test.txt (like example.com/test.txt) give error 403 / forbidden (even using chmod 777).

any idea ?

Thank You In Advance...


Solution

  • Just want to update the result here in case anyone interested.

    The permission of the /home/example.com/public_html folder was incorrect, that's why the web server has no permission to read the file. After fixing the folder permission, there's no 404 issue more, even after server rebooting.