By Anand Arun
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!
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…
:)
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?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.