Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --nginx mode, acme.sh can't find a server_name that exists #808

Closed
DaveQB opened this issue Apr 27, 2017 · 7 comments
Closed

Using --nginx mode, acme.sh can't find a server_name that exists #808

DaveQB opened this issue Apr 27, 2017 · 7 comments

Comments

@DaveQB
Copy link

DaveQB commented Apr 27, 2017

Steps to reproduce

acme.sh --issue --nginx --force --debug --log
(followed by 31 -d arguments)

Debug log

acme.sh --issue ..... --debug 2

[Thu Apr 27 17:45:41 AEST 2017] _isRealNginxConf wsgridiron.info /etc/nginx/sites-enabled/wspirates

[Thu Apr 27 17:45:41 AEST 2017] Can not find conf file for domain wsgridiron.info
[Thu Apr 27 17:45:41 AEST 2017] pid
[Thu Apr 27 17:45:41 AEST 2017] No need to restore nginx, skip.
[Thu Apr 27 17:45:41 AEST 2017] _clearupdns
[Thu Apr 27 17:45:41 AEST 2017] Dns not added, skip.
[Thu Apr 27 17:45:41 AEST 2017] _on_issue_err```

[Thu Apr 27 17:47:02 AEST 2017] code='202'

Yet:

grep -o  wsgridiron.info /etc/nginx/sites-enabled/wspirates  
wsgridiron.info  
wsgridiron.info  
wsgridiron.info  
wsgridiron.info     

I switched to --nginx mode after trying to list multiple domains each with their own webroot, but it seems you can only have 1 webroot with acme.sh
Such as:

-d 1.domain.com -d 2.domain.com -w /var/www/domain.com -d 3.domain.com -d 4.domain.com -w /var/www/domain2.com

For some reason acme tried to use /var/www/domain2.com for 1.domain.com. Anyway, that's another topic.

Thanks!

@Neilpang
Copy link
Member

if you have different webroot for the domains, you MUST specify webroots for EVERY domain in the command line, even though some of the domains may share the same webroot folder.

example:

acme.sh --issue  \
 -d 1.domain.com -w /var/www/domain.com \
 -d 2.domain.com -w /var/www/domain.com \
 -d 3.domain.com -w /var/www/domain2.com \
 -d 4.domain.com -w /var/www/domain2.com


@DaveQB
Copy link
Author

DaveQB commented Apr 27, 2017

@Neilpang Thank you so much for the fast response! I didn't deduce that from the docs. I'll try that. Not sure why the --nginx option is not working. Too many server_name values for acme to search through? Hmmm

@Neilpang
Copy link
Member

Give me the full log and the nginx conf file, otherwise I can not fix it.

@DaveQB
Copy link
Author

DaveQB commented Apr 27, 2017

@Neilpang Can I get that to you on a private channel please?

@Neilpang
Copy link
Member

Neilpang commented Apr 27, 2017

Yes, write email to me: [removed]

@DaveQB
Copy link
Author

DaveQB commented Apr 27, 2017

@Neilpang Thank you

@Neilpang
Copy link
Member

fixed. Please try with the latest dev branch:

export BRANCH=dev
acme.sh --upgrade

I will merge it to master if it works for you.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants