PHP based website files not working?

2 Cores, 30G Disk Space, 3G of Ram (Via MultiPass)
|OS type and version:| REQUIRED | Ubuntu 20.04 (Via MultiPass)

Hello all! I am new to Virtualmin/Webmin and am trying to setup a site. I successfully got it installed on my MultiPass VPS but now im a bit stuck! I have some php based website files and upload them to /home/myserver/public_html and i then go to Services and Preview Website and it shows the default Virtualmin page. Apologies if this question has already been asked, I have been able to find it anywhere. Thank you!

Hello and welcome to the community, @Dopeity .

The default Virtualmin page is created automatically by Virtualmin every time a new virtual server in created. When you uploaded files in home/myserver/public_html, you must have noticed an index.html file already present there. You must remove this file for the default Virtualmin page to be removed and the index.php page of your website to render.

You can remove Virtualmin’s default index.html via your SFTP client or Virtualmin’s file manager.

Ah ok! I have deleted it and uploaded my index.php file and now I have gotten a new error!
! (upload://mhHUQZlRMCU4sGsjKlYFBF4nxd6.png). I have no clue what could be causing it! Would i need to remove all the default files & folders from /public_html/?

I am unable to view your screenshot. You do not need to delete all the files and folders under public_html.

I have given you, in my previous communication, the reason you need to remove index.html - there is nothing I have said which would lead you to reasonably infer that all files and folders under public_html should be deleted.

If you wish to test with a fresh virtual server which does not have any files or folders under public_html, the approach I would take it to create a new virtual server and then upload a PHP file there to test it via the preview option. Further, I would investigate the logs (via Virtualmin → Server Configuration → Logs and Reports) to find the cause of the error, rather than go around randomly deleting files and folders under public_html.

You deleted the text part of your screenshot link (the part in []), so it’s not parsing correctly.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.