Joomla 5 Site in Virtual Host

NethServer Version: Nethserver 8
Module: Webserver, Mariadb
Anyone try installing Joomla 5 in a NS8 virtual host webroot? I’ve got it in place, but as I’m going through the initial configuration using Joomla’s browser installer, it wants db credentials. Prob is, it’s going to want to put it in database of the OS instance of mysql rather than the container instance of Mariadb in NS8. I’m not sure how to direct the installer to access the container instance?

Do you get a page to configure the database like shown in the screenshot?

I think you need to enter the wireguard IP and the port provided in the NS8 app settings as “Host Name”, see also MariaDB — NS8 documentation

For example 10.5.4.1:20029

1 Like

That was exactly it! After changing localhost to the IP:Port, Joomla threw a file in the installation folder I had to delete, then click ‘install Joomla’. Thank you, sir! I don’t suppose you know where I could increase the php max file size for the virtual host, other than the advanced configuration in cluster-admin? 2000 isn’t enough for some of the Joomla packages.

1 Like

It’s possible to customize the vhosts php-fpm, see also GitHub - NethServer/ns8-webserver: A webserver (nginx based) with php-fpm stack

In this example the first vhost using php8.3 with user 9001 of the webserver1 app instance is customized. Please adapt php version, user id and instance to match your case.

Run nano in the webserver1 app environment to create/edit the file php8.3-fpm-custom.d/dyn-9001.custom

runagent -m webserver1 nano php8.3-fpm-custom.d/dyn-9001.custom

Add following content to set your wanted size:

php_admin_value[upload_max_filesize]=3000M
php_admin_value[post_max_size]=3000M

EDIT:

Restart php-fpm 8.3 to apply the new config:

systemctl --user restart phpfpm@8.3
1 Like

Thank you Markus. Obviously PHPFPM8.3 doesn’t like a value larger than 3000, or it conflicts with some other PHP setting, because the webserver locks up when I try to make it higher. I can no longer access the website if I do. Put it back at 3000 and it works again.

I can’t reproduce, when I set it to 5000, phpinfo shows the correct value.

Do you use other custom settings next to the upload size?

EDIT:

Which Joomla package for example?

Here 5000 works in Joomla:

I forgot to mention that you need to restart php-fpm after changing config files.

To restart php-fpm 8.3:

systemctl --user restart phpfpm@8.3

I was only rebooting the VM after my dyn-9001.custom edits. You would think that would restart the phpfpm service. I had tried the restart before the reboot, but it didn’t work. Doing the phpfpm restart like the following, didn’t work:

root@Debian-NS8-VM:~# systemctl --user restart phpfpm@8.3
Unit phpfpm@8.3.service could not be found.

That restart command from within the runagent webserver environment did the trick. Once I did this it worked:

root@Debian-NS8-VM:~# runagent -m webserver3
runagent: [INFO] starting bash -l
runagent: [INFO] working directory: /home/webserver3/.config/state
webserver3@Debian-NS8-VM:~/.config/state$ systemctl --user restart phpfpm@8.3

This container stuff is a very new feel for me. I also have only ever used Virtualbox to run old Windows versions to run ancient software we use to program machinery.

Proxmox is nice, but very cumbersome to get VMs working like you need (at least like I have setup). That’s just a lack of experience, I’m sure. It’ll come. I think I’ll put Nethsecurity on its own PC and Proxmox with the Nethserver VM on its own PC, rather than both on the same PC within their VMs within the same Proxmox installation.

I like the simplicity of the Nethsecurity GUI. I may try OPNSense on another box. I don’t really care for separate firewalls, but it is what it is.

Thanks for your help, Markus.

1 Like

You’re welcome.

I have a question.
Did you need to change permissions to allow joomla to create configuration.php or did you create it manually?

See also Rsync to virtual host? - #14 by mrmarkuz

EDIT:

We already could reproduce the issue.

Permissions. webserver1:webserver1. Thought about doing it manually, but thought better against it. Oh, and for the install 0777. Wouldn’t run the install script completely until I did. Reminds me, I need to go back and change the folder and file permissions to recommended and see how it affects the website.

1 Like

Thanks for confirming.

Permission 755 and owner bin:root should work, see also Rsync to virtual host? - #23 by stephdl

1 Like