vm directadmin redirect subdomain nextcloud in proxmox

rafael-tmcloud

New member
Joined
Oct 14, 2026
Messages
1
Hi,

I am trying to set up a reverse proxy for a specific subdomain (nextcloud.domain.com) hosted under a primary domain (domain.com).

My Environment & Architecture:
Proxmox VE Setup: DirectAdmin is running on VM A (192.168.0.234), and Nextcloud is running on VM B (192.168.0.240).
Web Server: Standalone Nginx / Nginx reverse proxy managed by DirectAdmin.

Goal:
Requests hitting nextcloud.domain.com (ports 80 & 443) on DirectAdmin should be proxied to [http://192.168.0.240:80](http://192.168.0.240:80) (Nextcloud VM), while domain.com continues serving local PHP/files directly.

The Issue:
When using the Admin panel (Custom HTTPD Configurations > domain.com > Customize) or adding custom tokens (CUSTOM2), adding a location / block causes Nginx syntax check errors (nginx: [emerg] duplicate location "/"). This happens because DirectAdmin already generates a default location / block within the same server context for the main domain and subdomains.

My Question:
What is the recommended and cleanest way in DirectAdmin to proxy ONLY a specific subdomain (nextcloud.domain.com) to a custom local IP (192.168.0.240) without:Causing duplicate location / conflicts in Nginx.Affecting the main domain (domain.com).Having to re-create the subdomain as a separate main domain in the user panel.Is there an official DA template token or custom vhost hook specifically designed for subdomain reverse proxy?

Thank you!
 
Back
Top