Wildcard *.domain.com with Nginx


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » CustomBuild 2.0 » Nginx

Wildcard *.domain.com with NginxLast Modified: Jul 7, 2014, 6:41 pm
This guide is an extension of the Apache version and applies to a server running just Nginx, or Apache with Nginx as a proxy (nginx_proxy).
Use step 1 in the other guide to setup the dns in the same manner.

For the nginx.conf setup of a wildcard domain, you must be using DirectAdmin 1.45.5 or higher for for this feature.

2) Using the tool:

Admin Level -> Custom HTTPD Configuration -> domain.com

once you're editing the nginx config, you'd add this code into the top text area

|?SERVER_ALIASES=`SERVER_ALIASES` *.`DOMAIN`|





In a similar fashion to the apache guide, if you want normal control of other subdomains, and the full domain, you'd use the zzzz subdomain method:

|*if SUB="zzzz"|
|?SERVER_ALIASES=`SERVER_ALIASES` *.`DOMAIN`|
|*endif|



 
Related Helpfiles
Wildcard *.domain.com

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST