Single wordpress installation + iis reverse proxy

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: 14c72d2d-0086-a214-5096-d4f765ee3f65

This is the scenario:

Host A: IIS Server with reverse proxy ARR: domain_com
Host B: Bitnami lightsail Wordpress on linux: blog.domain_com/blog

Goal: load the blog by reverse proxy: domain_com/blog

At the momment, all work ok but i have a problem with the home page, show error too many redirects…

Actual configuration/changes:

  1. Bitnami AWS:
    File: /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf
    Discomment and change this lines to:
    Alias /blog/ “/opt/bitnami/apps/wordpress/htdocs/”
    Alias /blog “/opt/bitnami/apps/wordpress/htdocs”

  2. Wordpress:
    Set both sites URL to:
    Wordpress URL: https://domain_com/blog
    Site URL:https://domain_com/blog

  3. IIS Side.
    Create a folder called “blog” and convert to application, after plug a web.config with this content:

Note that the dot com is substitute with _
A limitation for new user in the forum limit to typing max two links in a post.

I can´t see the mode to edit the post, continue with more infomation of point 3, this is he content of web.config:

    <rule name="Reverse Proxy to WP" stopProcessing="true">
      <match url="^(.*)" />
      <action type="Rewrite" url="https://blog.domain_com/blog/{R:1}" />
                        <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
    <rule name="ReverseProxyOutboundRuleWP" preCondition="IsHtml">
      <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^http(s)?://blog.domain_com/blog/(.*)" />
      <action type="Rewrite" value="http{R:1}://domain_com/blog/{R:2}" />
	<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding" enabled="true">
      <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
      <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
      <preCondition name="IsHtml">
        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
	  <preCondition name="NeedsRestoringAcceptEncoding">
        <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />

With all of configuration, works all ok, I can access to wp-admin perfect, made changes, see all post, etc… but the main problem is with the home page: https://domain_com/blog , say error of many redirections of /blog

This occur when wordpress is set to permalink with post name or all other, but with simple name (id post) main page work ok.

More info related with wordpress, this occur when a page is set to principal in the section “read” of wordpress, if change to last post for principal page work ok.
The problem not in the page created, fail with all.

I try to disable all plugins and same result.

Any help?


Looking into your instance’s configuration, the config file wp-config.php does not include the definitions for WP_SITEURL and WP_HOME, could you check your configuration and included them if missing? I accessed your website and didn’t encounter any redirects issue, did you managed to solve the problem, or are you using one of the workarounds you mentioned?

If the problem persists, could you check to access your site from another browser and accessing it using a private session?

Francisco de Paz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.