Multiple version of PHP on different Virtual Hosts

  1. Because you’d have to keep it working and updates manually. So if you don’t know how to get it running, no offense meant, but I doubt very much you’ll be able to keep it running.

  2. Because it’s old, and might soon not be supported at all anymore, it runs the risk of becoming vulnerable to exploits since it’s no longer updated.

  3. Since it’s kept behind, it won’t keep up with the rest of the software that does still get regular updates and thus might cause breakage.

Virtual host with php8.1 e php8.2 only?

No, sorry. If you have specific questions, yes, but not a whole how to.

All depends on your requirements.

As said: Beside the package manager it is pretty much the same, just Ubuntu is more conservative in that regard and ArchLinux/Manjaro follows more upstream. So yes, it is possible.

You should stick with Ubuntu - you will be better off.

Don’t take this the wrong way - if you cannot create the desired setup yourself - you won’t be able to maintain it and you are not ready for a rolling release like Manjaro.

You will run into far too many issues over time which - in turn - will create frustration when your system breaks on sync.

2 Likes

I agree here. If you @DomyIT are not able to see the similarities and the few Deviations between Manjaro and Ubuntu, then I guess you are not ready to switch to Manjaro for web development. Stick with Ubuntu and get familiar with Manjaro in the meanwhile, before completely switching.

I want to try.

Should I start by following this guide?

3 Likes

That will get you started …

1 Like

I completed the procedure, everything works.
Any help creating a virtual host in a different directory?

read the manual - apache is apache

https://man.archlinux.org/man/extra/apache/httpd.8.en

You can use the phpmyadmin section in the guide you just followed, as a - sort of - template on how to create a virtual host

This create localhost/alias, not alias.test

Error 403 on “localhost” and virtual hosts…

permissions… apache runs as user http by default and the folders must match that. Plus add yourself to the http group, so that you have access.

Yes, this is possible. It requires you to either purchase a certificate from a recognised provider or create a self-signed certificate yourself for localhost (or for each vhost), which you can then manage in-house.

The latter has the benefit of being more affordable in comparison; but, note there will likely not be an abundance of reliable tutorials available in the wild, and it will require serious research.

I’m reluctant to create a step-by-step guide for this, or for any of your requests; only because I feel you need to do the work yourself and not be spoon-fed the answers in a convenient ‘how-to’ guide. Do your own research and learn it; don’t just copy it. :slight_smile:

Cheers.

One small tip, though. You’ll probably want to add the following to /etc/hosts at some point:

127.0.0.1 site1.test
127.0.0.1 site2.test
127.0.0.1 site3.test
1 Like

Help to do it? :smiley:

I will slowly learn to use Linux better, for now I need to configure my work environment.

I want to stay on manjaro, rolling release is a delight.

Done…
But 403 error…

sudo chown --recursive http:http /home/$USER/www/
sudo chmod --recursive 664 /home/$USER/www/
# or probably 775 if you need to execute files.
sudo usermod --append --groups http $USER

relogin to apply the group.

I’m not surprised. You’ll need to have set up your hosts first. Comment those out for now and leave them as a placeholder for whatever you will be calling your named hosts.

Same error…

What does it say in the logs?

ls /var/log/httpd/