UnamSanctam / UnamWebPanel

MIT License
164 stars 60 forks source link

A question about installing the panel on a VPS with Ubuntu OS #331

Closed HappyRoM4uK closed 5 months ago

HappyRoM4uK commented 5 months ago

Is there any list of necessary programs that must be installed for the panel to run normally on a vps? I tried to install the panel when xampp, lamp was installed on the server, but it did not give results. After installing sqlite3 and enabling pdo, the authentication page began to appear. But when I tried, it always gave me an error, which I haven't figured out how to solve yet.

Alcinzal commented 5 months ago

In my experience, on a fresh Ubuntu installation, I needed to install the following packages for the WebPanel to work: sudo apt install apache2 php php-sqlite3 Explained: apache2 is the web server. php is required to run php code on the web server. php-sqlite3 is required to use sqlite databases on the web server.

After this you naviage to /var/www/html. Here there should be a index.html file, which is just the default apache2 file. You can delete this file and replace it with the UnamWebPanel files.

If all is well it should work, however if it does not you might have to set the permissions properly. Navigate to /var/www and run chmod -R 755 html. This sets permissions for html and all files and folders inside it. Now you should be able to use the WebPanel, however if you still are unable, you might have to set the permissions to 777 instead, and then after logging in and checking that the WebPanel is working, then you can change back to 755, since having the permissions set to 777 means everybody can read, write and execute any file or folder. If you are only hosting it for yourself then it does not matter, but if you host it for other people to use, be careful.

I created a issue about chmod acting up here: https://github.com/UnamSanctam/UnamWebPanel/issues/330 UnamSanctam also talked about chmod here: https://github.com/UnamSanctam/UnamWebPanel/issues/198#issuecomment-1287889741 (htdocslocation is the html folder I am pretty sure)

UnamSanctam commented 5 months ago

It's as @Alcinzal said. You need a web server with PHP, sqlite3 and PDO (which it sounds like you have), and then make sure that both the db folder and unamwebpanel.db file inside that are writable (permissions and owner must be correct).

HappyRoM4uK commented 5 months ago

Thanks for the help, the problem really turned out to be access rights. After using chmod, everything started working fine.