How can i implement php and http configurations with virtualmin?

I am using linux ubuntu 20.04 on windows.

I installed virtualmin to my vps server. And i made basic configurations for it during my first login to virtualmin. Best part is that it checked my server completely and displayed the results. I really really liked it. I will just host two websites on my vhost. For that reason, before installing virtualmin i was doubting to install. But after seeing its “re-check configuration” function, i decided it is worth to install it.

But i am totally new and i need detailed guide how to use it correctly. At least i need to find answers to my questions below:
1- how should i create a virtual server in virtualmin?

2- What will happen to my other two enabled vhost config files that i have created via terminal. I can not say that they are completed but they are pointing to my domain and i have made some configurations in them (like directing non-www domain to www domain etc. ) They are: ( and under /etc/apache2/sites-enabled. Should i leave them as they are and create a new virtual server in virtualmin?

3-Beside this before creating my virtual server in virtualmin, i want to change my php version to php 8.1-fpm (i already have 8.1 but not fpm).

4- And my apache is not supporting HTTP/2. I also want to figure out this issue before creating my first virtual server with virtualmin. How should i do that?

Thank you.

This is easy. Virtualmin → Create Virtual Server.

Then in the page / form that is displayed, fill in the required fields and submit. Your virtual server will be created in a few moments.

I don’t know. Best undo whatever you did to create the vhosts manually. Why not use Virtualmin to do what it is supposed to do? None of us create vhost via terminal.

Let’s get you going with answers to questions 1 and 2 and see where things stand after you create a virtual server or few.

You have to install PHP manually. SSH in and:

sudo apt-get install php8.1-{cli,curl,pdo,fpm,zip,gd,xml,xmlrpc,mysql,cgi,common,mbstring,imagick}

That should be just about everything you need for most php-based websites. Then re-check configuration and you’ll see FPM as an option under Server Configuration > PHP Options. You’ll want to edit your master php configuration file located in /etc/php/8.1/fpm/php.ini to do that, go to: Webmin > PHP Configuration > and click Edit Manually next to /etc/php/8.1/fpm/php.ini. If you don’t see the fpm configuration file it means that the system failed to automatically find it, you can safely add it manually by clicking on the cog and then add: /etc/php*/fpm/php.ini,/etc/php/*/fpm/php.ini to a new line and save it, you may need to re-check configuration again after that. Anyway then edit your php.ini file and set your settings like upload_max_filesize to at least 20M etc. It’s all fully documented but it may take a while to get the settings you want set up properly so expect to take your time with it.

4- And my apache is not supporting HTTP/2. I also want to figure out this issue before creating my first virtual server with virtualmin. How should i do that?

You need to use HTTPS to support HTTP/2 or HTTP/3, it won’t work on HTTP://. Beyond that I don’t know what Apache’s defaults are so check their documentation, it’s simple enough in NGINX.

So try a forum search to @homelistt see forumguidelines. :wink:

Clear yes or no HTTP2 support and yes or no OCSP stapling support needed - General Discussion - Virtualmin Community

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