<div dir="ltr">This is not nginx redirecting, as there is no response body. Most likely it is your wordpress configuration that needs attention.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 5:03 PM, lukemroz <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I followed the instructions at Digital Ocean for setting up a WordPress<br>
installation, including enabling HTTPS on the nginx server.<br>
<br>
(The instructions are here:<br>
<a href="https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04" rel="noreferrer" target="_blank">https://www.digitalocean.com/<wbr>community/tutorials/how-to-<wbr>secure-nginx-with-let-s-<wbr>encrypt-on-ubuntu-16-04</a>)<br>
<br>
When accessing <a href="https://www.comfortglobalhealth.com" rel="noreferrer" target="_blank">https://www.<wbr>comfortglobalhealth.com</a>, I am always redirected<br>
to <a href="https://comfortglobalhealth.com" rel="noreferrer" target="_blank">https://comfortglobalhealth.<wbr>com</a>. Can someone suggest what change I need<br>
to make to my nginx configuration file so that this redirect doesn't<br>
happen?<br>
<br>
Thanks,<br>
Luke<br>
<br>
Here is my config:<br>
<br>
server {<br>
listen 80 default_server;<br>
listen [::]:80 default_server;<br>
server_name <a href="http://comfortglobalhealth.com" rel="noreferrer" target="_blank">comfortglobalhealth.com</a> <a href="http://www.comfortglobalhealth.com" rel="noreferrer" target="_blank">www.comfortglobalhealth.com</a>;<br>
return 301 https://$server_name$request_<wbr>uri;<br>
}<br>
<br>
server {<br>
listen 443 ssl http2 default_server;<br>
listen [::]:443 ssl http2 default_server;<br>
include snippets/ssl-<wbr>comfortglobalhealth.com.conf;<br>
include snippets/ssl-params.conf;<br>
root /var/www/html;<br>
index index.php index.html index.htm index.nginx-debian.html;<br>
server_name <a href="http://comfortglobalhealth.com" rel="noreferrer" target="_blank">comfortglobalhealth.com</a> <a href="http://www.comfortglobalhealth.com" rel="noreferrer" target="_blank">www.comfortglobalhealth.com</a>;<br>
location = /favicon.ico { log_not_found off; access_log off; }<br>
location = /robots.txt { log_not_found off; access_log off; allow all;<br>
}<br>
location ~* \.(css|gif|ico|jpeg|jpg|js|<wbr>png)$ {<br>
expires max;<br>
log_not_found off;<br>
}<br>
<br>
location / {<br>
try_files $uri $uri/ /index.php$is_args$args;<br>
}<br>
location ~ \.php$ {<br>
include snippets/fastcgi-php.conf;<br>
<br>
fastcgi_pass <a href="http://127.0.0.1:9000" rel="noreferrer" target="_blank">127.0.0.1:9000</a>;<br>
}<br>
location ~ /\.ht {<br>
deny all;<br>
}<br>
location ~ /.well-known {<br>
allow all;<br>
}<br>
}<br>
<br>
Here are my snippets:<br>
<br>
<a href="http://ssl-comfortglobalhealth.com">ssl-comfortglobalhealth.com</a>.<wbr>conf:<br>
ssl_certificate<br>
/etc/letsencrypt/live/<a href="http://www.comfortglobalhealth.com/fullchain.pem" rel="noreferrer" target="_blank">www.<wbr>comfortglobalhealth.com/<wbr>fullchain.pem</a>;<br>
ssl_certificate_key<br>
/etc/letsencrypt/live/<a href="http://www.comfortglobalhealth.com/privkey.pem" rel="noreferrer" target="_blank">www.<wbr>comfortglobalhealth.com/<wbr>privkey.pem</a>;<br>
<br>
ssl-params.conf:<br>
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br>
ssl_prefer_server_ciphers on;<br>
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:<wbr>AES256+EECDH:AES256+EDH";<br>
ssl_ecdh_curve secp384r1;<br>
ssl_session_cache shared:SSL:10m;<br>
ssl_session_tickets off;<br>
ssl_stapling on;<br>
ssl_stapling_verify on;<br>
resolver 8.8.8.8 8.8.4.4 valid=300s;<br>
resolver_timeout 5s;<br>
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";<br>
add_header X-Frame-Options DENY;<br>
add_header X-Content-Type-Options nosniff;<br>
ssl_dhparam /etc/ssl/certs/dhparam.pem;<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,268775,268775#msg-268775" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,268775,268775#msg-268775</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>