admin管理员组文章数量:1122846
We've hosted word press on AWS EC2 instance, and it's attached to AWS application load balancer(Internet facing), then it's attached to AWS cloud front, our website is pointing to AWS cloud front.
Requests follows this: User --> www.example.in --> AWS cloud front --> AWS ALB --> AWS EC2 instance.
When we are trying to access the word press with Domain name it's able to load,
Since WP application is hosted on httpd under /var/www/html/blogs/ so when we are trying to access the webpage www.example.in/blogs/ its loading but web pages is breaking I mean to say page structure is not good.
the issues is here When we're trying to access the wp-admin page www.example.in/blogs/wp-admin it's redirecting .php?redirect_to=http%3A%2F%2Fnvirginia-xxxxx-app-lb-2030706760.us-east-1.elb.amazonaws%2Fblogs%2Fwp-admin%2F&reauth=1
Followed multiple solutions but nothing working for me.
.htaccess file for redirection
[root@ip-10-0-2-194 blogs]# cat .htaccess
# BEGIN WordPress Multisite
# Using subfolder network type:
# Let apache know we're behind a SSL reverse proxy
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
# Redirect to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /blogs/
RewriteRule ^index\.php$ - [L]
# Add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . /blogs/index.php [L]
</IfModule>
# END WordPress Multisite
[root@ip-10-0-2-194 blogs]#
added this lines inside wp-config.php.
/* Add any custom values between this line and the "stop editing" line. */
define( 'WP_MEMORY_LIMIT', '512M' );
define('FORCE_SSL_LOGIN', false);
define('FORCE_SSL_ADMIN', false);
define( 'CONCATENATE_SCRIPTS', false );
define( 'SCRIPT_DEBUG', true );
define('WP_HOME', '');
define('WP_SITEURL', '');
/* Turn HTTPS 'on' if HTTP_X_FORWARDED_PROTO matches 'https' */
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
/** Handle real IP address */
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = trim($ips[0]);
} elseif (isset($_SERVER['HTTP_X_REAL_IP']) && !empty($_SERVER['HTTP_X_REAL_IP'])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CLIENT_IP'];
}
/* That's all, stop editing! Happy publishing. */
even we've updated our db with siteurl and home.
MariaDB [wordpress]> SELECT option_name, option_value FROM wp_options WHERE option_name = 'siteurl' OR option_name = 'home';
+-------------+-----------------------------------+
| option_name | option_value |
+-------------+-----------------------------------+
| home | |
| siteurl | |
+-------------+-----------------------------------+
2 rows in set (0.000 sec)
MariaDB [wordpress]>
we've created the certificate with *.example.in www.example.in and attached it to on the AWS cloud front and application load balancer also.
Our end goals is that we want to access the wp-admin page from our domain. When we hit the www.example.in/blogs/wp-admin we need to get the login page and able to login.
I'm Very new to Word press, if you fell that given .htaccess and wp-config.php are wrong. please do let me know what i need to modify to make it work, Thanks in advance.
本文标签: redirectWord press wpadmin redirecting to reauth1
版权声明:本文标题:redirect - Word press wp-admin redirecting to reauth=1 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736299834a1930601.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论