Linked Questions

1
vote
3answers
23k views

nginx redirect http to https not working [closed]

I am trying to reroute from http to https. For example you visit example.com and you will be automatically redirected to https://example.com. I tryed using this one: server { listen 80;...
-1
votes
2answers
194 views

How can I point my custom domain to a google cloud instance

So, I got a domain, suputamadre.es I launched a google cloud instance and assigned an IP to it, say 1.2.3.4 I launched my django server to listen on 0.0.0.0:80 I try to connect by going on chrome ...
1
vote
1answer
96 views

Force redirect to https on specific port on nginx?

I have website on port 8080 and I want to force https on it. ex. If I type http://mywebsite.com:8080, it should redirect to https://mywebsite.com:8080 How can I do this in nginx conf?
0
votes
1answer
5k views

browser returns ERR_EMPTY_RESPONSE if https:// is not included with TDL

When a device tries to reach 'GraphWhy.org' they receive the following error 'ERR_EMPTY_RESPONSE'. Connections only occur if 'https://graphwhy.org' is entered My Nginx file follows. I have tried ...
2
votes
2answers
224 views

Nginx redirect nonWWW to WWW / SSL certbot

I have been trying to figure out for a while how to redirect the requests from the non-WWW domain to the WWW domain. This is the HTTPS.conf file: server { server_name domain.com *.domain.com; ...
226
votes
7answers
296k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.example.com It should only be accessible via HTTPS but I'm worried people might somehow stumble upon it via HTTP and get a 404. My html/...
2
votes
2answers
2k views

How to redirect all HTTP traffic to HTTPS for a Django 1.4 application running on an EC2 with nginx/uWSGI behind ELB with an SSL cert

I would like to know how to put my entire django site behind HTTPS. If anyone tries to come via HTTP I want that user to be redirected to HTTPS. Currently, firefox is giving me the error "Firefox has ...
0
votes
0answers
550 views

Nginx one server{} block to redirect non-www to www for HTTP and HTTPS

I have an Nginx web server and I need to: Redirect all HTTP (both www and non-www) to HTTPS Redirect all HTTPS non-www to www I know that I can use different server{} blocks but I want to achieve ...
1
vote
2answers
3k views

Can't access AWS EC2 instance via public IP but can via SSH

I have an AWS EC2 Instance that can be accessed via SSH but will not load via its public IP. The page continually loads and then times out. I have checked the security group and the following is ...
0
votes
1answer
6k views

Nginx - too many redirects [duplicate]

Sorry of the messy conf file. I have been trying everything, so it's become a mess. I want to enable SSL and redirect all traffic to https. Currently, with the below conf file, I can navigate to HTTP ...
0
votes
1answer
87 views

nginx with unicron add https to nginx and redirect https default

Below I have added my nginx.conf file , how to add https to this nginx server and redirect to https by default. I have my crt and key files in /home/ubuntu/ssl/ folder worker_processes 1; user ...
0
votes
0answers
77 views

How to redirect all http traffic to https [duplicate]

I am using nginx and would like all http traffic to become https using nginx. can someone post an example for nginx config file? Here is mine. it's not working and i don't have a lot of nginx ...
3
votes
1answer
825 views

nginx: redirecting to SSL based on the original request URL (not $server_name) [duplicate]

I have an nginx config that is similar to this: server { server_name my-english-site.com my-french-site.com; listen 0.0.0.0:80; rewrite ^ https://$server_name$request_uri? permanent; } ...
1
vote
2answers
422 views

How to serve same content to https and http with nginx?

Typically my nginx config looks like this: server { listen 80; server_name example.com; <some long config> } server { listen 443; server_name example.com; ...
1
vote
3answers
2k views

Nginx & Https Redirection

I have an ssl certificate for www.domain.com. Obviously if someone goes to https: //domain.com, they will get an error from the browser about a certificate mismatch. Is it possible to setup the ...

15 30 50 per page