Welcome! Log In Create A New Profile

Advanced

Re: Simple SSL Question

António P. P. Almeida
June 08, 2013 02:56PM
You need to include the SSL certificate and the key directives on the
server block that does the SSL redirect.
Le 8 juin 2013 20:30, "B.R." <reallfqq-nginx@yahoo.fr> a écrit :

> Hello,
>
> On Sat, Jun 8, 2013 at 2:18 PM, Travis Maxwell <the.energetic@gmail.com>wrote:
>
>> Hi,
>>
>> I'm using nginx with SSL, and I want to always redirect to www,
>> regardless of whether the request is http or https. I just want to redirect
>> to the respective protocol but with www.
>>
>> I have the port 80 server block working fine. Beneath my first server
>> block I have...
>>
>> server {
>> listen 80;
>> server_name example.com;
>> return 301 http://www.example.com$request_uri;
>> }
>>
>> and this works fine. But for my port 443 server block for https, I have
>> all kinds of information inside regarding ssl on and different ciphers to
>> use.
>>
>> I really don't want to mess up anything up related to security by doing
>> something stupid.. so my question is on this second block for port 443
>> underneath the first one...
>>
>> server {
>> listen 443;
>> server_name example.com;
>> return 301 https://www.example.com$request_uri;
>> }
>>
>> do I need anything else? do I need ssl on or any other security related
>> things? If they visit non-www does that mean it transfers the request
>> insecurely or something (even for a split second while its redirecting?)
>>
>>
>>
> Put both 'listen' directives in the same server block.
>
>
>
>
>> Just want to make sure what I have is solid and secure. It seems to work
>> but I want to double check.
>>
>> Thanks!
>>
> ---
> *B. R.*
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Simple SSL Question

Travis Maxwell June 08, 2013 02:20PM

Re: Simple SSL Question

B.R. June 08, 2013 02:32PM

Re: Simple SSL Question

António P. P. Almeida June 08, 2013 02:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready