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:
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.
I don’t think hosting is really the focus of this forum…
I have not administered virtual hosts, but settings for apache are changed either in the virtual host config, or htaccess. Similar for php, there you have php.ini too.
On my sites, since i am on a shared hosting and cannot access the host config, i force different php versions per forder in the .htaccess
I’m from Ubuntu, I was looking for an approach like this:
I’m from Ubuntu
You can use php-legacy and current php - that’s all
Can you tell me the commands to use to accomplish what I asked?
I’m just starting out…
Hi @DomyIT, and welcome!
AFAIK PHP 8.0 is no longer supported. I might be wrong about this, though. But if ao, then it won’t be supported for long anymore.
Thus, keeping it is a bad idea
so I recommend you rather look at a docker or other container if you can’t use the latest version.
It’s also not really possible in the same way as the article, for that I’d recommend Ubuntu LTS.
I have some old projects still running on PHP 8.0…
Now it’s not the PHP version that matters, but how to accomplish what I asked.
Get it a earlier PHP version running with docker:
I would like to create virtual hosts by customizing the document root and the PHP version…
Is it possible?
Posssible? Yes, as with just about any- and everything Linux.
a Good idea? Not at all.
Will you find help accomplishing bad ideas on the forum? No, because we don’t promote bad ideas.
Have a look about doing this in thee Arch wiki, if you don’t want to follow our advice:
I have successfully installed php8 (default) and php7, apache with virtual hosts and SSL. I want to be able to specify which version of php runs in each virtual host. Is there a nice, simple guide on how to do this on Manjaro, please?
This file has been truncated.
# Install Any PHP on Arch / Manjaro
Through the AUR it is possible to install older and newer PHP versions, simultaneously on the same system. I often had trouble installing using pacman and pamac so here's what I did:
mkdir -p $HOME/bin
git clone https://aur.archlinux.org/php81.git
It is not entirely different from that, just the names are slightly different.
Package php is PHP v8.2 and package php-legacy is PHP v8.1. Anything lower is only in the AUR, so not like Ubuntu officially supported, but if needed available. If PHP 8.3 came out, then it becomes packages php and PHP 8.2 becomes php-legacy. PHP 8.1 will be dropped to the unsupported AUR.
PHP 8.0. You see here the basic package and all modules separately.
That said… it is the same software, but the main difference is just the package manager, naming convention and support cycle.
Can you guide me step by step? I think it’s a good idea to setup the system the way I would like to work.
Is it possible to achieve a similar result?
Why is it a bad solution?
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.
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?
NOTE: The phrase ip.x.y.z is a placeholder for the server address which can be a valid hostname or an IP address e.g. 192.168.1.10 2023-05-23T22:00:00Z (UTC) by
Added sed command to inject blowfish_secret into config.inc.php 2023-01-04T23:00:00Z (UTC) by @linux-aarhus
Fix missing semicolon in config.inc.php 2022-12-28T23:00:00Z (UTC) by @linux-aarhus
Rewritten using a simplified language 2022-11-12T07:02:00Z (UTC) by @linux-aarhus
Verified on 2022-11-06T15:…
That will get you started …
I completed the procedure, everything works.
Any help creating a virtual host in a different directory?