How do I implement SSL on port - nginx

In my Nginx server, I have added SSL to my subdomain using the chatbot.
https://www.example.com/ works but https://www.example.com:8081 doesn't work.
This page gives me "This site can’t provide a secure connection; ERR_SSL_PROTOCOL_ERROR'
Is there any way to configure SSL for this domain with a port?

Related

SSL certificate from Netlify - HTTPS with Digital Ocean

I am new at deploying web applications. I have set up a web server on Digital Ocean that is running on top of NGINX. Besides, I have a front application running on Netlify. The connection between the server and the web is not established (error 400) and I suspect a port problem.
I have double-checked the CORS policy, but my guess is that NGINX listens to port 80 for HTTP request (open), while Netlify automatically creates a SSL certificate which makes my requests go through the HTTPS protocol.
My question is: do I need to do anything else than setting up Nginx on the server side in such a way it listens to port 443 (HTTPS port), or do I need to generate another SSL certificate on the server side?
My intuition is option 1, but I feel lost with all these notions.
its CORS error, your Netlify HTTPS will not allow you to hit insecure HTTP API. You need to enable HTTPS on your droplet on Digital Ocean by providing a Domain Name to your application. Follow the link

How can I redirect NON HTTP/NON HTTPS traffic to a specified IP with Nginx?

I have website and some game server.
I have domain which I connect to Cloudflare.
I want to redirect non http/https traffic to my server IP because when I try to connect to server with domain I can't do this because of Cloudflare proxy.
Maybe it can be done differently?
I use Nginx.
Cloudflare has its own SSL configuration.
There are 4 options for you:
Off disables https completely
Flexible Cloudflare will automatically switch client requests from HTTP to HTTPS but it still points to port 80 on your nginx server, should not configure SSL on nginx in this case.
So the only options for you are Full or Full Strict (more restricted on the cert configured on nginx, must be a valid cert).
With Full you can configure your nginx with a self-signed SSL and let it go. Cloudflare will handle the part between client and its proxy server.

Checking SSL works before migrating a site

I have a website on server 1 that has an SSL certificate, I need to move a new developed site to server 2 which has a new SSL certificate. The SSL has been installed on server 2, is there anyway to check if the site and the ssl certificate works before changing the nameservers from server 1 to server 2.
I have tried editing the hosts file on my computer with the IP address of server 2 and the site loads, but as it only shows the IP address in the url bar so there doesn't seem to be a way to tell if the SSL is working, if i add https:// to the domain IP it doesn't work.
Thanks in advance.
When you change the hostfile to the second server with the correct domainname it should listen as if it were used from a nameserver from the outside world.
For example, if you want to test server 2 with IP 194.194.194.194 with the domainname www.example.com you should add this line to your hostfile:
194.194.194.194 www.example.com
After you add this it is possible to go to https://www.example.com which should serve you the certificate if everything is configured right.
Cheers!

Failed redirect from naked domain on SSL

I have recently installed SSL on my AWS hosted wordpress site and my named domain is no longer working.
https:// example.com, https:// www.example.com, www.example.com are all working as expected.
example.com is not working. example.com throws a connection refused error.
The Setup:
Wordpress hosting is on a single AWS EC2 installed off the bitnami AMI. EC2 sits behind a classic load balancer.
SSL certificate is managed on AWS certificate manager and was issued to *.example.com, example.com and www.example.com
DNS uses route 53: www.doamin.com and domain.com have A records that point to the same load balancer alias
.htacces has been modified with RewriteRule ^(.*)$ https://example.com/$1 [R,L]
What do I do to get this working?
HTTPS does work, so the issue is not DNS. You mention a load balancer. The Connection Refused error indicates that your request is not making it to the load balancer or being accepted by the load balancer.
Check your security groups for the load balancer and ensure port 80 inbound is allowed.
Check your load balancer has a listener on port 80.
If you have modified the NACL's (Network Access Control Lists) on the public subnets of the loadbalancer, then you will need to allow 80 inbound and everything outbound. The default NACL rules already allow this.
As an aside, I note that you are terminating SSL on the load balancer (because you are using an ACM cert). Depending on your configuration, this may mean that you are forwarding requests to your web server unencrypted on port 80. If so then your re-write rules will not correctly detect the use of HTTPS. AWS has some documentation explaining this in more detail.

http:// website listed as https:// in search results

I have a Wordpress website that is being listed in Google results as a https:// website. Thing is that I have not set up a SSL or https:// for this website.
I've searched online and some people suggested that I might have https:// links inside my website and indeed there were some. However, after doing this modifications the website result still directs to a https:// address
Is there any other way I can fix this?
https will by default connect to port 443. You can then send a redirect (if possible) from your webserver from port 443 to the client to go the http on port 80 instead. I think that you have to send a redirect to the client. Making port 443 redirect directly to port 80 in your webserver's configuration may not remove the encryption and cause some issues

Resources