Help setting up other web apps on nextcloudpi machine

Hi everyone.

I have my Nextcloud setup on my raspberry pi 4 through the nextcloudpi distro, using No-IP for outside access. I want to be able to setup other apps in the same domain. For example, I am trying to setup Piwigo alongside it and would like to configure it so that I can access my cloud through and piwigo through .

I have piwigo setup in /var/www/piwigo and created a config file for piwigo at /etc/apache2/sites-available as in this tutorial, but I still cannot access the piwigo installation page.

Is this the right configuration for what I want? I am still a beginner in this self hosted world, and some help would be appreciated :slight_smile:

The tutorial you shared link to, is for Ubuntu 16.04 | 17.10 | 18.04.
NCP uses Debian 10, which might or might not be compatible. Also It is using php7.2, while NCP comes with php7.3.

I’ve never tried this, but would likely add a virtual host for apache2, and I’d rather prefer to set a subdomain for piwigo as in and use for Nextcloud.
Also I’d not expect to much on performance side, depending how many users and data would be using both Nextcloud and Piwigo, at the same time. Both would be using the same database server, presumably. I do not own a rpi4, on (rpi 2B and) 3B I have found access to slow on any requests needing db queries, for even a single user. NC updates too were streching my patience :wink:

I’d get decent hardware and learn how to set up your NC and whatever service you want. Or use docker containers (or snap) for one or each of the apps you want.

I have googled for this as well because I am so lazy and I don’t want to setup another letsencrypt fqdn/apache virtual site, but I haven’t found an answer, so I had to dig myself.

This is what I’ve found (I use nextcloud vm):
First, the vm generates this apache configuration “/etc/apache2/sites-enabled/your-fqdn.conf”. I have enabled “LogLevel alert rewrite:trace6” in it because I suspected mod_rewrite would prevent /var/www/nextcloud/piwigo from being accessed directly so looking at the logs this confirmed my suspicion.

While there is no rewrite configuration in the apache file, there is a rewrite happening in /var/www/nextcloud/.htaccess.

By carefully examining the rewrite rules there, I added this exception for the piwigo directory (the line I inserted into the file is in bold):

RewriteCond %{REQUEST_FILENAME} !/richdocumentscode/proxy.php$
RewriteCond %{REQUEST_FILENAME} !/piwigo/*
RewriteRule . index.php [PT,E=PATH_INFO:$1]

After that, /piwigo worked. Note that I did not consult documentation so I have no idea if my syntax is correct - it just works for my private vm accessed only by me via my personal vpn, so you might want to really read the mod_rewrite docs and see if this introduces any security vulnerability or if it really is correct for mod_rewrite