Report this

What is the reason for this report?

Someone guide me in setting up Let's Encrypt in additional site in same Nginx VPS?

Posted on March 29, 2017

Hi!

My one site radha.org.br is fine, with Certificate working. I intend to make an additional domain also https. Someone so kind to guide me into this?

I just completed a tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04 and set all up for this new site with success! The only thing is that this new site is actually online in another server. I am preparing everything to bring it to my VPS in DO. I can’t point it’s domain to DO yet. I want to prepare everything so that i can either redo or migrate it to DO.

Thanks a lot for any help or suggestion!!!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey, @jtittle

In the default block file i have:

# SSL configuration
	#
	  listen 443 ssl default_server;
	  listen [::]:443 ssl default_server;
	  include snippets/ssl-radha.org.br.conf;
          include snippets/ssl-params.conf;

In the arun block file i’ll have:

# SSL configuration
	#
	# listen 443 ssl http2;
	# listen [::]:443 ssl http2;
	#  include snippets/ssl-i'd-set-arun.com.br.conf;
        #  include snippets/ssl-params.conf;

In the directory snippets there is no arun.com.br.conf there…

I’ll uncomment these lines…

:)

@Areku

If you’ve already setup your previous server block and it’s working, and you’re simply wanting to setup a new one, you’d simply copy the existing over to a new file and modify it to match the new domain.

You’d modify these directives:

server_name
root
ssl_certificate
ssl_certificate_key

The rest of the configuration is really dependent on your setup. Those are the only directives that will change behavior in terms of responding to requests for the domain, where files are pulled from, and where your certificate files are.

The only other thing to note would be that you can’t have two server blocks tagged with:

default_server

So this portion:

    listen 80 default_server;
    listen [::]:80 default_server;
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

Would become:

    listen 80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

i.e. default_server is stripped out.

Hey, @jtittle

In this portion in the default file:

location ~ /.well-known {
                allow all;
        }

In the arun block file i have:

# location ~ /.well-known {
        #        allow all;
        #}

I´ll uncomment these lines, right?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.