separate virtual host for pointers

siavash90

New member
Joined
Nov 26, 2024
Messages
1
HI
In DirectAdmin, I have set up multiple domain pointers for each domain.
By default, DirectAdmin creates a configuration block for each domain pointer in the file /usr/local/directadmin/data/users/foo-user/nginx.conf.

However, I need to avoid having all of these in one file and prevent creating a new block for each pointer.
Two types of customization seem applicable and might solve my problem:

Consolidating pointers in the main domain block :
Instead of creating separate blocks, all domain pointers could be read from a list or included file within the main domain block.
For example :
Code:
server_name |DOMAIN| www.|DOMAIN| |ALIAS_LIST|;


Or alternatively:
Code:
server_name |DOMAIN| www.|DOMAIN|
include /etc/nginx/aliases/|DOMAIN|.conf;

Creating separate configuration files for pointers :

Similar to subdomains, separate host configuration files could be created for each pointer within the domain structure.
For instance:

Code:
/foo-user/pointers/foo-domain-pointer/nginx.conf

Despite my efforts, I couldn't make either of these implementations work. My primary issue is that after customizing the templates, whenever I create a new pointer or use rewrite_confs, DirectAdmin automatically appends a new block for the pointer to the end of the nginx.conf file.

I am unsure about the exact settings or template customizations required in DirectAdmin to address this issue.
I would greatly appreciate it if you could provide guidance or suggest a solution.

Best regards
 
Back
Top