• Resolved FiWeBelize

    (@fiwebelize)


    Looks like there something up with the permalinks… Basically, if I switch my permalinks to Plain things work … As soon as I switch it to Post Name things break….

    I was following this: https://codex.www.ads-software.com/Administration_Over_SSL which noted the wp-config.php items.

    I ensured that I:

    • switched both WordPress Address (URL) and Site Address (URL) are https
    • set define('FORCE_SSL_ADMIN', true); in wp-config.php
    • set if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; in wp-config.php

    My domain is: fiwebelize.com
    My operating system is: Ubuntu 16.04.2 LTS
    My web server is: nginx version: nginx/1.10.3 (Ubuntu)
    I host on my own server

    Not sure what else will be needed but let me know and I will be more than happy to provide whatever info is needed.

    Thanks

    • This topic was modified 7 years, 11 months ago by FiWeBelize.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter FiWeBelize

    (@fiwebelize)

    Thread Starter FiWeBelize

    (@fiwebelize)

    Have disabled every single plugin and it’s still broken.

    Thread Starter FiWeBelize

    (@fiwebelize)

    Looking at my nginx logs I see this:

    2017/03/27 23:33:30 [error] 2640#2640: *2520 "/var/www/html/tag/firefox/index.php" is not found (2: No such file or directory), client: <IP-ADDRESS>, server: fiwebelize.com, request: "GET /tag/firefox/ HTTP/1.1", host: "fiwebelize.com"
    2017/03/27 23:33:34 [error] 2640#2640: *2519 "/var/www/html/articles/index.php" is not found (2: No such file or directory), client: <IP-ADDRESS>, server: fiwebelize.com, request: "GET /articles/ HTTP/2.0", host: "fiwebelize.com", referrer: "https://fiwebelize.com/"

    Please post your Nginx configuration here.

    You must have missed something in it…

    For example, please make sure you have something like the following in your config…

    location / {
    
    try_files $uri $uri/ /index.php$is_args$args;
    
    }

    In the above config, /index.php$is_args$args is important. It may be missing on yours.

    • This reply was modified 7 years, 11 months ago by Pothi Kalimuthu. Reason: better formatting!
    Thread Starter FiWeBelize

    (@fiwebelize)

    Here’s the output from /etc/nginx/nginx.conf

    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    
    events {
            worker_connections 768;
            # multi_accept on;
    }
    
    http {  
            # Basic Settings
            sendfile on;
            tcp_nopush on;
            tcp_nodelay on;
            keepalive_timeout 2;
            types_hash_max_size 2048;
            # server_tokens off;
            # server_names_hash_bucket_size 64;
            # server_name_in_redirect off;
            
            include /etc/nginx/mime.types;
            default_type application/octet-stream;
            
            # SSL Settings
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
            ssl_prefer_server_ciphers on;
            
            # Logging Settings
            access_log /var/log/nginx/access.log;
            error_log /var/log/nginx/error.log;
            
            # Gzip Settings
            gzip on;
            gzip_disable "msie6";
            
            include /etc/nginx/conf.d/*.conf;
            include /etc/nginx/sites-enabled/*;
    }
    Thread Starter FiWeBelize

    (@fiwebelize)

    Actually.. You were right… I added the

    try_files $uri $uri/ /index.php$is_args$args;

    to my sites-enabled config file. For some reason the tutorial I followed missed that in their config.

    They had the section of the file as:

        location / {
            if ($scheme = http) {
                return 301 https://$server_name$request_uri;
            }
        }

    I changed it to:

        location / {
            try_files $uri $uri/ /index.php$is_args$args;
            if ($scheme = http) {
                return 301 https://$server_name$request_uri;
            }
        }

    Thanks Pothi.

    Glad you were able to identify and fix. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Ubuntu and Nginx – SSL Works but only homepage loads’ is closed to new replies.