Hi, I hope all is well
I have nginx/1.25.2 in my Windows server 2022 on my Drive Z. I wanted to install my domain SSL on it! But I couldn’t!
Can any body help me step by step, please?
I am waiting for your reply
Thank You
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!
Heya @alinejadbahram,
Setting up SSL on Nginx, even on Windows, follows a somewhat similar procedure as on Linux. Here’s a step-by-step guide to help you set up SSL for your domain on Nginx running on your Windows Server:
Obtain SSL Certificate for Your Domain:
Place the Certificates in an Accessible Directory:
fullchain.pem and privkey.pem or their .crt and .key equivalents), place them in a directory on your server, for instance, Z:\nginx\ssl\.Update Your Nginx Configuration:
server block for your domain, add the following:listen 443 ssl;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate Z:/nginx/ssl/fullchain.pem;
ssl_certificate_key Z:/nginx/ssl/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384';
# Other configurations...
Replace yourdomain.com with your actual domain name and adjust the paths to point to where you’ve placed your SSL certificates.
4. Redirect HTTP to HTTPS (Optional): If you want to force redirect all HTTP traffic to HTTPS, you can add another server block like this:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://$host$request_uri;
}
nginx -t
nginx -s reload
Heya,
In addition to what’s has been already mentioned, you can check this article on Microsoft’s documentation on how to install SSL as well.
Regards
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.