[GH-ISSUE #596] Unable to set Wildcard Subdomain #500

Closed
opened 2026-02-26 06:33:08 +03:00 by kerem · 13 comments
Owner

Originally created by @socheatsok78 on GitHub (Sep 5, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/596

Describe the bug

  • A clear and concise description of what the bug is.
  • What version of Nginx Proxy Manager is reported on the login page?

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Proxy Host'
  2. Click on 'New Proxy Host'
  3. Scroll down to 'Domain Names'
  4. Add *.example.com

Expected behavior
Unable to add *.example.com

Screenshots
This is the example screenshot on your website:

image

Originally created by @socheatsok78 on GitHub (Sep 5, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/596 **Describe the bug** - A clear and concise description of what the bug is. - What version of Nginx Proxy Manager is reported on the login page? **To Reproduce** Steps to reproduce the behavior: 1. Go to 'Proxy Host' 2. Click on 'New Proxy Host' 3. Scroll down to 'Domain Names' 4. Add `*.example.com` **Expected behavior** Unable to add `*.example.com` **Screenshots** This is the example screenshot on your website: ![image](https://user-images.githubusercontent.com/4363857/92303233-15087080-ef9d-11ea-93a7-7d617a89840b.png)
kerem 2026-02-26 06:33:08 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@leimantas commented on GitHub (Sep 9, 2020):

It works when I create cert from SSL CERTIFICATES menu. I can create wildcard domain.

Is it because of this filter?

https://github.com/jc21/nginx-proxy-manager/blob/master/frontend/js/app/nginx/certificates/form.js#L200
image

https://github.com/jc21/nginx-proxy-manager/blob/master/frontend/js/app/nginx/proxy/form.js#L227
image

<!-- gh-comment-id:689419869 --> @leimantas commented on GitHub (Sep 9, 2020): It works when I create cert from SSL CERTIFICATES menu. I can create wildcard domain. Is it because of this filter? https://github.com/jc21/nginx-proxy-manager/blob/master/frontend/js/app/nginx/certificates/form.js#L200 ![image](https://user-images.githubusercontent.com/46538777/92575855-1aa9d300-f289-11ea-8ee1-c1afcc708db0.png) https://github.com/jc21/nginx-proxy-manager/blob/master/frontend/js/app/nginx/proxy/form.js#L227 ![image](https://user-images.githubusercontent.com/46538777/92575774-08c83000-f289-11ea-8fbc-8c44c51ed008.png)
Author
Owner

@socheatsok78 commented on GitHub (Sep 9, 2020):

I think that might be the issue, have been looking at that too.

<!-- gh-comment-id:689464450 --> @socheatsok78 commented on GitHub (Sep 9, 2020): I think that might be the issue, have been looking at that too.
Author
Owner

@leimantas commented on GitHub (Oct 23, 2020):

Any news? Now I manually edit generated nginx file.

<!-- gh-comment-id:715173239 --> @leimantas commented on GitHub (Oct 23, 2020): Any news? Now I manually edit generated nginx file.
Author
Owner

@launtony commented on GitHub (Oct 23, 2020):

@leimantas How do you do that manually? What is the modified file?

<!-- gh-comment-id:715197267 --> @launtony commented on GitHub (Oct 23, 2020): @leimantas How do you do that manually? What is the modified file?
Author
Owner

@leimantas commented on GitHub (Oct 23, 2020):

Make folder for data files, mount it and then after creating PROXY sub.domain.com - go to this folder/nginx/proxy_host ; And there you will find generated conf file. Just edit this line: server_name sub.domain.com; into this: server_name *.domain.com;

It works with cloudflare.

And also! You have to create wildcard subdomain cert first.

<!-- gh-comment-id:715200964 --> @leimantas commented on GitHub (Oct 23, 2020): Make folder for data files, mount it and then after creating PROXY sub.domain.com - go to this folder/nginx/proxy_host ; And there you will find generated conf file. Just edit this line: **server_name sub.domain.com**; into this: server_name *.domain.com; It works with **cloudflare**. And also! You have to create wildcard subdomain cert first.
Author
Owner

@socheatsok78 commented on GitHub (Oct 24, 2020):

The latest update seem to fixed the issues with wildcard domain proxy.
But I haven't had time to try it yet.

image

<!-- gh-comment-id:715748611 --> @socheatsok78 commented on GitHub (Oct 24, 2020): The latest update seem to fixed the issues with wildcard domain proxy. But I haven't had time to try it yet. ![image](https://user-images.githubusercontent.com/4363857/97069114-fd8e5100-15f7-11eb-8669-1f4f1bcabb3c.png)
Author
Owner

@launtony commented on GitHub (Oct 24, 2020):

@socheatsok78 I'm running the latest version and the wildcard is not supported :/ You don't have the "Add" button :/

<!-- gh-comment-id:715880107 --> @launtony commented on GitHub (Oct 24, 2020): @socheatsok78 I'm running the latest version and the wildcard is not supported :/ You don't have the "Add" button :/
Author
Owner

@leimantas commented on GitHub (Oct 24, 2020):

Ye, not working.
Code =>
Code
Test =>
Test

<!-- gh-comment-id:715889712 --> @leimantas commented on GitHub (Oct 24, 2020): Ye, not working. Code => [Code](https://github.com/jc21/nginx-proxy-manager/blob/master/frontend/js/app/nginx/proxy/form.js#L281) Test => [Test](https://regexr.com/5eq8o)
Author
Owner

@felixgeissler commented on GitHub (Nov 3, 2020):

I ran into that same bug. Will have to live with a custom config for now...

Edit:
I just executed the POST /api/nginx/proxy-hosts manually and it worked.

Sample request in CURL (not tested, since I used Insomnia):

curl 'https://YOUR-NGINX-PROXMANAGER-INSTANCE/api/nginx/proxy-hosts' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'Accept-Language: en,de;q=0.7,en-US;q=0.3' --compressed \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Authorization: Bearer YOUR_JWT_HERE' \
  -H 'Origin: https://YOUR-NGINX-PROXMANAGER-INSTANCE' \
  -H 'DNT: 1' \
  -H 'Connection: keep-alive' \
  -H 'Referer: https://YOUR-NGINX-PROXMANAGER-INSTANCE/nginx/proxy' \
  -H 'Cookie: _ga=GA1.2.1959346365.1603901789; _gid=GA1.2.2145157280.1604407981' \
  -H 'Pragma: no-cache' \
  -H 'Cache-Control: no-cache' \
  --data-raw ' \
  { \
    "domain_names": [ \
      "*.YOURDOMAIN.TLD" \
    ], \
    "forward_scheme": "http", \
    "forward_host": "localhost", \
    "forward_port": 8443, \
    "block_exploits": true, \
    "access_list_id": "0", \
    "certificate_id": 0, \
    "meta": { \
      "letsencrypt_agree": false, \
      "dns_challenge": false \
    }, \
    "advanced_config": "", \
    "locations": [], \
    "caching_enabled": false, \
    "allow_websocket_upgrade": false, \
    "http2_support": false, \
    "hsts_enabled": false, \
    "hsts_subdomains": false, \
    "ssl_forced": false \
  }'

Make sure to replace the YOUR-NGINX-PROXMANAGER-INSTANCE, YOUR_JWT_HERE & *.YOURDOMAIN.TLD

<!-- gh-comment-id:721428995 --> @felixgeissler commented on GitHub (Nov 3, 2020): I ran into that same bug. Will have to live with a custom config for now... **Edit:** I just executed the POST /api/nginx/proxy-hosts manually and it worked. Sample request in CURL (not tested, since I used Insomnia): ``` curl 'https://YOUR-NGINX-PROXMANAGER-INSTANCE/api/nginx/proxy-hosts' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0' \ -H 'Accept: application/json, text/javascript, */*; q=0.01' \ -H 'Accept-Language: en,de;q=0.7,en-US;q=0.3' --compressed \ -H 'Content-Type: application/json; charset=UTF-8' \ -H 'Authorization: Bearer YOUR_JWT_HERE' \ -H 'Origin: https://YOUR-NGINX-PROXMANAGER-INSTANCE' \ -H 'DNT: 1' \ -H 'Connection: keep-alive' \ -H 'Referer: https://YOUR-NGINX-PROXMANAGER-INSTANCE/nginx/proxy' \ -H 'Cookie: _ga=GA1.2.1959346365.1603901789; _gid=GA1.2.2145157280.1604407981' \ -H 'Pragma: no-cache' \ -H 'Cache-Control: no-cache' \ --data-raw ' \ { \ "domain_names": [ \ "*.YOURDOMAIN.TLD" \ ], \ "forward_scheme": "http", \ "forward_host": "localhost", \ "forward_port": 8443, \ "block_exploits": true, \ "access_list_id": "0", \ "certificate_id": 0, \ "meta": { \ "letsencrypt_agree": false, \ "dns_challenge": false \ }, \ "advanced_config": "", \ "locations": [], \ "caching_enabled": false, \ "allow_websocket_upgrade": false, \ "http2_support": false, \ "hsts_enabled": false, \ "hsts_subdomains": false, \ "ssl_forced": false \ }' ``` _Make sure to replace the YOUR-NGINX-PROXMANAGER-INSTANCE, YOUR_JWT_HERE & *.YOURDOMAIN.TLD_
Author
Owner

@benricok commented on GitHub (Feb 9, 2021):

Update? Otherwise manually editing the file will have to do.

<!-- gh-comment-id:775862914 --> @benricok commented on GitHub (Feb 9, 2021): Update? Otherwise manually editing the file will have to do.
Author
Owner

@chaptergy commented on GitHub (May 9, 2021):

It is possible to add a wildcard certificate through the dedicated SSL Certificates tab. You'll need to do the dns challenge then, so your dns provider needs to be supported. It is not possible to add a wildcard certificate from within the create host popup, so you will have to create the certificate beforehand.

<!-- gh-comment-id:835863535 --> @chaptergy commented on GitHub (May 9, 2021): It is possible to add a wildcard certificate through the dedicated _SSL Certificates_ tab. You'll need to do the dns challenge then, so your dns provider needs to be supported. It is not possible to add a wildcard certificate from within the create host popup, so you will have to create the certificate beforehand.
Author
Owner

@dawnerd commented on GitHub (May 13, 2021):

Latest version still has this problem. Was able to add on an older instance but adding a wildcard subdomain (not a cert) still fails.

<!-- gh-comment-id:840806891 --> @dawnerd commented on GitHub (May 13, 2021): Latest version still has this problem. Was able to add on an older instance but adding a wildcard subdomain (not a cert) still fails.
Author
Owner

@chaptergy commented on GitHub (May 13, 2021):

Ah, sorry, Ivwas ging through these issues quickly, I Seen to have misubderstood. Sorry.

<!-- gh-comment-id:840817021 --> @chaptergy commented on GitHub (May 13, 2021): Ah, sorry, Ivwas ging through these issues quickly, I Seen to have misubderstood. Sorry.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#500
No description provided.