LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Multiple version of PHP on different Virtual Hosts (Manjaro Linux) (https://www.linuxquestions.org/questions/linux-newbie-8/multiple-version-of-php-on-different-virtual-hosts-manjaro-linux-4175729425/)

DomyIT 09-30-2023 09:58 AM

Multiple version of PHP on different Virtual Hosts (Manjaro Linux)
 
Hi everyone, I'm a web developer.
I would like to be able to configure apache, php, mariadb and phpmyadmin.
I would like to create a virtual host for each project.

The structure should be this:
- /home/user/www/site1/ (PHP 8.2)
- /home/user/www/site2/ (PHP 8.1)
- /home/user/www/site3/ (PHP 8.0)

I would like to be able to access the site via the addresses:
- site1.test
- site2.test
- site3.test

On “site1” I would like the root document to be:
- /home/user/www/site1/public (Laravel installation)

Can you tell me the procedure for doing this?

If possible, also enable HTTPS on virtual hosts...

Thanks in advance to everyone.

wpeckham 09-30-2023 01:05 PM

#1 you may be an html mechanic, but a web developer who does not know how to set up any web services?

#2 you need some web specific sysadmin skills, and there are two ways to get them. I recommend both, but in the right order.
a. study. Read up on how to implement an httpd server using apache httpd. (Although there are arguably better options.)
b. practice by setting up httpd servers and configuring them.

Repeat 2 with each of the other tools you need in turn until you can put things together quickly and correctly.

Then stay up to date on the changes and updates for each of your tools so you can change your procedures as they evolve (because none of them stand still).

OR, you could do your own search for a web page document or wiki that covers the procedure pretty much they way you want to do it. IT will be out of date as soon as anything changes, but will give you a "formula" for how to do it. IF it is not terribly different from your needs it might even work for you, but you will be lacking the detailed information you need to make informed adjustments and adjust to updates and changes as they occur.

If you cannot take the time to learn, you might team up with someone who is less of a web designer, but more of a sysadmin. This would allow you to split the learning and build load and cross-train each other.

I have totally ignored the skills needed to either obtain, configure, network, and address servers platforms (physical or virtual machines) because each of those is a whole 'nother can of worms and you did not say which way you plan to go.

DomyIT 09-30-2023 02:03 PM

I would simply like a guide to configure the environment for me, I develop locally, the servers I usually rely on vps managed with plesk, which does not require knowing how to configure a web server.
Can you help me?

wpeckham 09-30-2023 08:22 PM

I think what you are going to want to do is set up multiple CONTAINERS with the right tools and versions. Actually create ONE and then clone it to the others with the target version of PHP. Something like Docker or OpenVZ might serve, depending upon what your host server happens to be.

You did not specify what you are building on.

With enough information someone might be able to find or suggest the appropriate how-to document. I do not have that information at hand.


All times are GMT -5. The time now is 03:33 PM.