nginx_apache doesn't use custom templates

enricovangoor

Verified User
Joined
Oct 30, 2020
Messages
13
Location
Netherlands
Hi,
I have installed DA on a new VM with webserver=nginx-apache and Varnish. I copied the following 4 templates to /usr/local/directadmin/data/templates/custom:
  • nginx_server.conf
  • nginx_server_secure.conf
  • nginx_server_sub.conf
  • nginx_server_secure_sub.conf
I changed the files, so the proxy_pass addresses port 6081 and did ./build rewrite_confs.

When I create a new customer and website, the newly created template isn't being used. In /usr/local/directadmin/data/users/<username>/nginx.conf it still uses port 8080 and port 8081 in stead of 6081. When I change the configuration manually and reload nginx the setup does work.
What can I do the make DA use the altered templates?

Thanks in advance!
 
check template, maybe there are an error,
you can add any string via custom HTTPD at admin level in (nginx_proxy) section, at any modification it will try to generate nginx_conf for selected domain from template, and will show are there any errors at bottom of this page
 
When I add the comment #testing in nginx.conf customization for <domain>, it regenerates the configuration, without any error messages. When I check the configuration, the comment is added to the configuration file in /usr/local/directadmin/data/users/<username>, but the template isn't being used.
When I click the view button in the webinterface, I also see the comment, but with the wrong configuration. At the bottom of this page I do see the the templates I adjusted. Clicking on them I also see a diff.
 
check main nginx.conf to find where are paths to included users confs
 
I've traced it via /etc/nginx/nginx.conf -> /etc/nginx/directadmin-vhosts.conf -> /usr/local/directadmin/data/users/<user>/nginx.conf.
The last does contain the comment I included, but doesn't contain the changes I made in the template.
 
Back
Top