Host nextcloud and apache2 webserver on same IP server with subdomain

Hello everyone

I have a nextcloud & apache2 server set up. Now I want to point the subdomain ‘’ to the nextcloud server while still having the main domain ‘’ pointing at my webserver/website. How can I do that?

I tried editing the virtual host but the subdomain ‘’ is always pointing at the webserver and not the nextcloud server.

This is what I added, but I’m not sure if I did it right:

<VirtualHost *:80>

<VirtualHost *:60001>
        DocumentRoot /var/www/nextcloud/

Thanks, Jan

Hello @janbo,

your question is about apache.
Please search the web or use official apache docs

1 Like

Yes, I know. I tried that but I couldn’t find exactly what I was looking for with apache therefore I tried my luck here. I was hoping someone might have had the same issue.

1 Like