Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think the symlink command should be “ln -s . blog” (not ln -s blog . )

    [root@02352f099824 html]# ls -al blog
    lrwxrwxrwx 1 root root 1 May 19 03:28 blog -> .
    [root@02352f099824 html]#

    Also I added one more entry in wp-config.php.

    if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
    $_SERVER[‘HTTPS’]=’on’;

    After adding this entry above the define(‘WP_HOME’, it started working.

    Note: define(‘WP_SITE_URL’,’https://sub.example.com/blog’) is commented. As you pointed out, this line is not required, it seems.

    Formatting of https://sub.example.com/blog also working fine now. Hopefully there are no surprise issues.

    Thank you so much Bobby for your help.

    Thank you for the response Bobby. Unfortunately I am still not able to make it work. When I put pure html file instead of wordpress, proxypass is working fine.

    When I create symlink with the command you mentioned, output is as follows.

    [root@host html]# pwd
    /var/www/html
    [root@host html]# ls -al blog
    lrwxrwxrwx 1 root root 4 May 19 01:51 blog -> blog
    [root@host html]#

    Hi Bobby, I am facing the same issue when setting up SSL secured wordpress in a docker container.
    OS: CentOS 7 in both main host and container. PHP 7.3

    In main apache host:

    Added below Proxypass entries in sub.example.com’s port 80 and 443 virtual hosts.

    <Location /blog>
    RequestHeader set X-Forwarded-Proto “https”
    RequestHeader set X-Forwarded-Port “443”
    ProxyPass http://10.X.X.X:8085
    ProxyPassReverse http://10.X.X.X:8085
    Order allow,deny
    Allow from all
    </Location>

    inside container, wordpress is installed in /var/www/html.

    .htaccess below.

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

    wp-config.php below

    define(‘WP_HOME’,’https://sub.example.com/blog&#8217;);
    define(‘WP_SITEURL’,’https://sub.example.com/blog&#8217;);

    Still when I try to access https://sub.example.com/blog/, it shows the contents with formatting completely lost. http://sub.example.com/blog/ loads fine.

    Both https://sub.example.com/blog/wp-admin and http://sub.example.com/blog/wp-admin gives 404 errors. Can you please suggest if anything I missed

Viewing 3 replies - 1 through 3 (of 3 total)