Discover Centmin Mod today
Register Now

Wordpress Wordpress permalinks broken when Xenforo in root?

Discussion in 'Blogs & CMS usage' started by moshbit, Jul 28, 2014.

  1. moshbit

    moshbit Member

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    9:58 AM
    1.5.8
    MariaDB 5.5
    Hey folks, I'm having a weird problem with broken permalinks in Wordpress 3.9.1. I have wordpress installed in the /blog subfolder on my domain. in the root i have xenforo 1.3.3 installed.

    now, using the centmin.sh script, i've set up various other domains, installed wordpress, and using the instructions here:

    Nginx Wordpress Configuration Examples for rewrite rules & FastCGI Caching

    got permalinks working fine. of course, this is always with wordpress in the root and nothing else. but when i set up wordpress with xenforo in the root (and WP in /blog as stated above) all my permalinks are broken.

    My only guess right now is that there's some kind of conflict between xenforo and wordpress rendering urls, since i understand that having xenforo in the root and wordpress in the subfolder is kinda the opposite of what most folks do, or.... (more likely) i'm not doing something right in my conf file.

    would someone mind taking a look here and telling me what i did wrong?

    Code:
    server {
      server_name squattheplanet.com www.squattheplanet.com;
      return 301 https://$server_name$request_uri;
    }
    
    # https SSL SPDY vhost
    server {
            listen 443 ssl spdy;
                server_name squattheplanet.com;
            client_max_body_size 128m;
            ssl_certificate      /usr/local/nginx/conf/ssl/squattheplanet.com/ssl-unified.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/squattheplanet.com/squattheplanet_com.key;
            ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK;
            ssl_prefer_server_ciphers   on;
            #add_header Alternate-Protocol  443:npn-spdy/3;
            add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
            #add_header  X-Content-Type-Options "nosniff";
            #add_header X-Frame-Options DENY;
            # nginx 1.5.9+ or higher
            # http://nginx.org/en/docs/http/ngx_http_spdy_module.html#spdy_headers_comp
            # http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size
            # spdy_headers_comp 0;
            # ssl_buffer_size 4k;
    
            # enable ocsp stapling
            resolver 8.8.8.8;
            ssl_stapling on;
            ssl_stapling_verify on;
            ssl_trusted_certificate /usr/local/nginx/conf/ssl/squattheplanet.com/ssl-trusted.crt;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/squattheplanet.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/squattheplanet.com/log/error.log;
    
      root /home/nginx/domains/squattheplanet.com/public;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      location / {
    
      # block common exploits, sql injections etc
      #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      index index.php index.html index.htm;
      try_files $uri $uri/ /index.php?$uri&$args;
      }
    
        location /radio/ {
            proxy_pass            http://localhost:25555/radio/;
            proxy_set_header   Host                         $host;
            proxy_set_header   X-Real-IP                  $remote_addr;
            proxy_set_header   X-Forwarded-For       $proxy_add_x_forwarded_for;
            }
    
        location /blog {
        include /usr/local/nginx/conf/wpsecure.conf;
        include /usr/local/nginx/conf/wpnocache.conf;
    
        try_files $uri $uri/ /index.php?q=$request_uri;
            }
    
            location /internal_data/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
            location /library/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
        location /install/ {
        index index.php index.html index.htm;
        allow 127.0.0.1;
        allow 68.185.32.59;
        deny all;
        include /usr/local/nginx/conf/php.conf;
           }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,976
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,765
    Local Time:
    2:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    blog location syntax needs changing i believe

    Code:
        location /blog {
        include /usr/local/nginx/conf/wpsecure.conf;
        include /usr/local/nginx/conf/wpnocache.conf;
    
        try_files $uri $uri/ /blog/index.php?q=$request_uri;
            }
     
  3. moshbit

    moshbit Member

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    9:58 AM
    1.5.8
    MariaDB 5.5
    oh, DUH! *slaps self on forehead* totally fixed now. thanks for that :)
     
    • Like Like x 1