Support » Fixing WordPress » OSX Server v5.03/4 breaks WP 4.3x install

  • glucas

    (@glucasmaccom)


    I have a Mac Mini running OSX 10.10.11 (El Capitan) along with OSX Server, currently v5.0.4. PHP v5.5.29

    All was well until I upgraded Server v4.1.5 to v5.03/4 which now breaks WP with a ‘too many redirects’ error.

    Apple setup apache in Server 5.0.3/4 as a Reverse Proxy and remaps port 80 >> 34580 and 443 > 34543.

    I have no trouble accessing the database on a different domain on the same server via SSL, but WP redirects (loops) and can’t find the root.

    I am using the default htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Here is the apache directive in the 0000_xxx.xxx.xxx.xxx_34580_www.sitename.conf file:

    `RewriteEngine on
    RewriteCond %{HTTP:X-FORWARDED-FOR} !^$
    RewriteCond %{REQUEST_METHOD} !^(PROPFIND|OPTIONS)$
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.*)([^/])$ %{HTTP:X-FORWARDED-PROTO}://%{SERVER_NAME}/$1$2/ [R=301,L,NC]`

    Here is the apache directive in the 0000_xxx.xxx.xxx.xxx_34543_www.sitename.conf file:

    `RewriteEngine on
    RewriteCond %{HTTP:X-FORWARDED-FOR} !^$
    RewriteCond %{REQUEST_METHOD} !^(PROPFIND|OPTIONS)$
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.*)([^/])$ %{HTTP:X-FORWARDED-PROTO}://%{SERVER_NAME}/$1$2/ [R=301,L,NC]`

    I found a solution for Jommla with the same issue here.

    Very stuck (two days now) hope someone can help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I think I have the same problem – everything was working (on a Mac mini under Yosemite), but upgrading to Server 5.03 broke everything (i.e. almost every link gives a ‘too many redirects’). Upgrading to 5.04 and then to El Capitan didn’t fix anything.

    I found that including this code block:

    if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
    $_SERVER[‘HTTPS’]=’on’;

    in wp-config.php above the final ‘include once’ statement restored my site to operation. Before, I was getting the redirect errors on the admin pages.

    @bgaspers – worked for me, thank you very much! (putting the above before the ‘require_once’ at the end of the file)

    Yeah, sorry, the ‘require_once’ statement. I was trying to remember the line but was too lazy to pull up the wp-config file again.

    glucas

    (@glucasmaccom)

    Thanks to all, greatly appreciated.

    glucas

    (@glucasmaccom)

    This issues still recurs randomly; so above may not be a complete fix. Perhaps it is related to Timeout or KeepAlive settings?

    Suggestions?

    Thank you so much bgaspers. Upgrading from OS X server 4.1.5 to 5.0.15 completely broke my WordPress site but this fix has it all back and working perfectly!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘OSX Server v5.03/4 breaks WP 4.3x install’ is closed to new replies.