简体   繁体   中英

wordpress website behind AWS Application load balancer

I created Application Load Balancer in AWS and installed word press website on ec2-instance. I can access website fine if I access using the public ip address of ec2-instance. However, I cannot access the pages whenever I try to access using DNS Name of Application Load Balancer. The error code returned by chrome is 301 .

Security Group of instance allows all traffic from load balancer at port 80.

There is nothing in the access logs or error logs. I have no experience dealing with wordpress. Please let me know if I can provide any further information to find issue.

Edit: If I place the same instance behind Classic Load Balancer , instead of Application Load Balancer , then it seems to work fine.

301 is a redirect, not an error code. You probably need to configure your custom domain to point to the load balancer, then configure Wordpress to be aware of the domain name so it won't try to redirect.

I guess you installed WordPress directly by accessing the ec2 instance?

I can remember a similar problem with WordPress making redirections (301) when it has been installed via a wrong domain. If it is an option, reinstalling WordPress directly through the Load Balancer should fix this problem.

@Zohaib - i am having the exact same issue. I installed wordpress directly on EC2 instance. Although I have changed siteurl and home for wordpress to point to my application load balancer, the wp-admin link still takes me to the EC2 instance. I know it has been a while, but I can use your suggestion

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM