Nginx only serves 1 App

Moshe Katz moshe at ymkatz.net
Thu May 24 01:28:46 UTC 2018


Here's how you would do it:

First, run this command (substituting your example of `new.page.com` for
any other new domain):

certbot certonly --webroot -w /usr/share/nginx/html -d new.page.com

*Note that the "webroot" directory is the same for ALL sites here, because
of these
lines: https://gist.github.com/kohenkatz/08a74d757e0695f4ec3dc34c44ea4369#file-redirect-all-http-to-https-conf-L16-L22
<https://gist.github.com/kohenkatz/08a74d757e0695f4ec3dc34c44ea4369#file-redirect-all-http-to-https-conf-L16-L22>*

After certbot has run successfully, copy the configuration in one of the
other per-site files (right now "cloud.conf" and "chat.conf") and modify it
as needed.

The reason this works is that the configuration section I linked to above
sends all certbot verification requests to the same directory no matter
what site they are destined for.

Hope that makes sense.

Moshe


On Wed, May 23, 2018 at 4:15 PM Nginx-Chris <nginx-forum at forum.nginx.org>
wrote:

> I mean how would the nginx config for new.page.com look like?
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,279794,279935#msg-279935
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180523/bb7f04b2/attachment.html>


More information about the nginx mailing list