wp-admin not accessible – The requested URL was not found on this server

0

On AWS instance I’ve installed Ubuntu 22 and then WordPress. I am using subdomain of a registered domain. (Domain was registered for another site running on another instance). I am trying to create a new instance for testing and I am using subdomain of registered domain.

I can access the frontend of my WordPress but not the backend.

When I try to login to my wp-admin backend by typing in browser

http://aws_route_53_subdomain_name.domain_name.com/wp-admin

I get this error

"Not Found" The requested URL was not found on this server. Apache/2.4.52 (Ubuntu) Server at <IP address> Port 80".

I also tried entering

"aws_route_53_subdomain_name.domain_name.com/wordpress/wp-admin",

but the result is the same.

When I hit enter I see the URL changes to something like

"http:///wordpress/wp-login.php?redirect_to=http%3A%2F%2Ftest.%2Fwp-admin%2F&reauth=1".

Can you please help me with this?

I suspect that the issue could be with the fact that I am using subdomain of a first prod instance and pointing it to another (this new) test instance. (I can access the frontend with “mydomainname.com” but not the backend) E.g when I ran

sudo certbot --apache

I got this error

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems: Domain: www.test.mydomainname.com Type: dns Detail: DNS problem: NXDOMAIN looking up A for www.test.mydomainname.com - check that a DNS record exists for this domain; DNS problem: NXDOMAIN looking up AAAA for www.test.mydomainname.com - check that a DNS record exists for this domain Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet. Some challenges have failed. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
1 Resposta
0

Please let me understand the questions:

You have an AMI (OS is Ubuntu 22) and you have installed and configured Apache2 and WordPress on this AMI. You have a hosted zone which has a FQDN with A record, and CNAME which points to FQDN, even though there are two URLs but point to the same address, FQDN.

Or, you have created another hosted zone for your subdomain which is not functioning as per your requirements.

Do these two instances have the same configuration, such as Apache2, WordPress, Virtual Host, and SSL/TLS configuration?

Second part of the question is the problem with SSL/TLS certificate. Did you create the SSL/TLS for both FQDN and CNAME (subdomain) together or separately? Did you create SSL/TLS before opening the WordPress/wp-admin or after the opening WordPress/wp-admin? Do you have a caa record in the hosted zone?

Resolution

It appears protocol issues. If you have configured SSL/TLS after configuring the WordPress/wp-admin, such as http. After configuring SSL/TLS the WordPress/wp-admin will not open with the newly configured https (SSL/TLS).

You could make a snapshot of the original AMI and make an instance out of it, instead of creating of a new instance. You should create the SSL/TLS certificate first, before opening the WordPress/wp-admin site. You can remove/delete the SSL/TLS certificate with the appropriate command.

Check your /etc/hosts file, whether the IP addresses are correct, as well for both instances.

Please do not hesitate to contact with further information.

respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas