Basic php file not working

I created a child domain under my primary website and I am trying to run a simple php file. But is giving me an error message “403 Forbidden Access to this resource on the server is denied!”

I tried, “File Manager → Fix Permissions button” still not working.

I checked error log…and it says the following.
MIME type [application/x-httpd-php] for suffix ‘.php’ does not allow serving as static file, access denied!

Hello Happy you are here

Seems like lsphp is not setup you need to tell ols that your default lsphp external application will be serving .php scripts in this virtual host.

Setup script handler for your php by going to LiteSpeed WebAdmin console → Server → Script Handler and point to the right external app (php) Set up OLS with Multi PHP versions – OpenLiteSpeed

How can I do that from the CyberPanel Control panel?

Go to OLS WebAdmin Console of your server i.e https://SERVER_URL:7080 use admin and password you chose for CyberPanel admin panel

If you cannot log in. Using SSH Terminal run adminPass add new password e.g.

adminPass mynewstrongpasswordgoeshere

If that fails for some reason user:

cd /usr/local/lsws/admin/misc

Cyberpanel admin password is not working… Is there any other port I need to open other than 7080?

Why didn’t the cyberpanel automatically setup lsphp when I created the website?

Your issue is rare but since cyberpanel is based on litespeed or the opensource openlitespeed depending on what you chose during setup the fix is just that.

Use above commands to generate new password and retry.

your php version?

This command does not work, the password does not set.

How to access this OLS, I did not even know of the existence of this panel. :confused:

cd /usr/local/lsws/admin/misc

This should work out of the box

I got the same issue, my main domain it works fine, but sub domain shows

MIME type [application/x-httpd-php] for suffix '.php' does not allow serving as static file, access denied!


Already tried this method, both in the Content and in the site htaccess
@usmannasir Do you have any suggestions?
I get this in every error log I can see on every domain.

I think it even has something to do with my subdomain not working as it should.
If the ID at the end is listed in my Database, it turns “true” if false, it should say false.
But here on my subdomain it just returns internal error 500.

Both the main domain and sub domain have the exact same mas folder.
Same files, nothing changed.
Any idea why it can’t load?

Right ID works:

Non ID broken:

Main domain both works: