Run two differents webservices under Nextcloud AIO Apache?

Hi !

I’m new to the nextcloud community, and I love the software !

I installed the nextcloud AIO package on my home server :

  • Nextcloud version : 28.0.3
  • Operating system and version : OMV7
  • Apache or nginx version : Apache/2.4.58
  • PHP version : [don’t know it]
  • Set up on port 80 and 443, behind a DNS Name (nextcloud.[domain].[xxx])

In the hardware, I have :

  • i7 6700
  • 16GB Ram
  • 512 GB NVMe
  • 12 TB Raid 5 Storage

I’m currently not facing any issue, but I want something special.
I would like to install a second service in parallel of nextcloud, on the same port (80 and 443 since it’s a web server).
In my case, I want photoprism (sorry Nextcloud, but I can’t with the photo plugin), under the photoprism.[domain].[xxx] address, on the same port. (The goal remain the same, this may be any web services here)
The wanted instance is actually running on local, under HTTP (on local network, don’t worry) → Since it’s a test version, I can basically reset everything from scratch if needed (nextcloud maybe not, or not if I cannot use a backup to re-setup everything).

Is this possible ? If yes, how can I do it ?

Since everything work great on the nextcloud instance, I don’t think it’s useful to add different outputs and files as prompted on the template. In any case, I can provide them if they may be useful.

I’m pretty new to the self-host community, so please talk me with simple worlds. I know a bit about some subjects, and can understand a lot of concepts.

Thanks by advance for any help !

*I’m FR, and I understand EN without issues. You can write in any languages, I will understand easily (EN may be preferred, since I’m on the EN topic).

Hi, instead of using photoprism, I would rather recommend memories to you which is a photoprism alternative and runs as Nextclud app. See all-in-one/community-containers/memories at main · nextcloud/all-in-one · GitHub for how to easily set up its hardware transcoding container in order to also transcode videos on the fly.

Yes, it’s possible!

I myself run Apache, hosting Nextcloud, Roundcube, a landing page and others I wrote myself, and more.

You need to configure virtual servers. I’m on FreeBSD, so our setups are a bit different. But you should have something like an “httpd.conf” file. On BSD, that main conf file is configured to “include” additional conf files, that way you can compartmentalise your setup. But look for something in your config like the below:

<VirtualHost *:443>
    DocumentRoot /usr/local/www/MyDomain.tld
    ServerName MyDomain.tld
    SSLEngine on
    SSLCertificateFile "/usr/local/etc/letsencrypt/live/MyDomain.tld/fullchain.pem"
    SSLCertificateKeyFile "/usr/local/etc/letsencrypt/live/MyDomain.tld/privkey.pem"

<VirtualHost *:443>
    DocumentRoot /usr/local/www/nextcloud
    ServerName cloud.MyDomain.tld
    SSLEngine on
    SSLCertificateFile /usr/local/etc/letsencrypt/live/MyDomain.tld/fullchain.pem
    SSLCertificateKeyFile /usr/local/etc/letsencrypt/live/MyDomain.tld/privkey.pem

In the above, each “ServerName” is the URL. You can see I’ve got my main domain (MyDomain.tld), and the second site is my Nextcloud domain (cloud.MyDomain.tld).

The DocumentRoot is where the website contents are in your server’s file system, so they’ll be pointing at different spots. The rest is my encryption settings.

Hopefully this will point you in the right direction. Your question was very high-level, and you need to explore more and then ask a more specific question, there are too many variables to give you info. But yes, you can run multiple webservices, but you’ll need a URL per service.