Richard Stanway
August 04, 2016 12:46PM
This is not nginx redirecting, as there is no response body. Most likely it
is your wordpress configuration that needs attention.

On Thu, Aug 4, 2016 at 5:03 PM, lukemroz <nginx-forum@forum.nginx.org>
wrote:

> Hello,
>
> I followed the instructions at Digital Ocean for setting up a WordPress
> installation, including enabling HTTPS on the nginx server.
>
> (The instructions are here:
> https://www.digitalocean.com/community/tutorials/how-to-
> secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)
>
> When accessing https://www.comfortglobalhealth.com, I am always redirected
> to https://comfortglobalhealth.com. Can someone suggest what change I
> need
> to make to my nginx configuration file so that this redirect doesn't
> happen?
>
> Thanks,
> Luke
>
> Here is my config:
>
> server {
> listen 80 default_server;
> listen [::]:80 default_server;
> server_name comfortglobalhealth.com www.comfortglobalhealth.com;
> return 301 https://$server_name$request_uri;
> }
>
> server {
> listen 443 ssl http2 default_server;
> listen [::]:443 ssl http2 default_server;
> include snippets/ssl-comfortglobalhealth.com.conf;
> include snippets/ssl-params.conf;
> root /var/www/html;
> index index.php index.html index.htm index.nginx-debian.html;
> server_name comfortglobalhealth.com www.comfortglobalhealth.com;
> location = /favicon.ico { log_not_found off; access_log off; }
> location = /robots.txt { log_not_found off; access_log off; allow all;
> }
> location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
> expires max;
> log_not_found off;
> }
>
> location / {
> try_files $uri $uri/ /index.php$is_args$args;
> }
> location ~ \.php$ {
> include snippets/fastcgi-php.conf;
>
> fastcgi_pass 127.0.0.1:9000;
> }
> location ~ /\.ht {
> deny all;
> }
> location ~ /.well-known {
> allow all;
> }
> }
>
> Here are my snippets:
>
> ssl-comfortglobalhealth.com.conf:
> ssl_certificate
> /etc/letsencrypt/live/www.comfortglobalhealth.com/fullchain.pem;
> ssl_certificate_key
> /etc/letsencrypt/live/www.comfortglobalhealth.com/privkey.pem;
>
> ssl-params.conf:
> ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
> ssl_prefer_server_ciphers on;
> ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
> ssl_ecdh_curve secp384r1;
> ssl_session_cache shared:SSL:10m;
> ssl_session_tickets off;
> ssl_stapling on;
> ssl_stapling_verify on;
> resolver 8.8.8.8 8.8.4.4 valid=300s;
> resolver_timeout 5s;
> add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
> add_header X-Frame-Options DENY;
> add_header X-Content-Type-Options nosniff;
> ssl_dhparam /etc/ssl/certs/dhparam.pem;
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,268775,268775#msg-268775
>
> _______________________________________________
> 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

Re: Basic Question: Unable to access https:// with www prefix

Richard Stanway August 04, 2016 12:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 263
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