skip to Main Content

Runing vHost nginx on ubuntu. After I added a wordpress SEO friendly urls my main page (index) became non secured. However all other pages are

Index non secured.

enter image description here

All other pages are secured.

enter image description here

Can someone point me at the right direction? How do i get index page secured?

server {

    listen 80;

    listen [::]:80;

    listen 443 ssl;

    listen [::]:443 ssl;

    ssl on;
    ssl_certificate /etc/nginx/ssl-certs/MYSITE.com.crt;
    ssl_trusted_certificate /etc/nginx/ssl-certs/MYSITE.com.crt;
    ssl_certificate_key /etc/nginx/ssl-certs/MYSITE.com.key;
    ssl_prefer_server_ciphers on;

        server_name MYSITE.com www.MYSITE.com;

        root /var/www/MYSITE.com/public_html;
        index index.php index.html;
        autoindex on;
        include /etc/nginx/macros/macro;
        include /etc/nginx/snippets/phpmyadmin.conf;




                ####Please add below lines for SEO Friendly URLs
                location / {
                index index.php;
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }

        location ~ .php$ {
 try_files $uri =404;
 fastcgi_split_path_info ^(.+.php)(/.+)$;
 fastcgi_pass unix:/var/run/php5-fpm.sock;
 fastcgi_index index.php;
 include fastcgi_params;
 }
}

After I added a wordpress SEO friendly urls my main page (index) became non secured. However all other pages are

Tried to clean cookies, tried on different PC, same thing everywhere.

2

Answers


  1. Try to use WordPress plugin “REALLY SIMPLE SSL“. Hope it will work.

    Login or Signup to reply.
  2. Do you have a serverside valid ssl? (do you have ssl running on your host?)
    then use really simple ssl to fix all the content to go through https.

    you can also use cloudflare and use HTTPS rewrite feature.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search