Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wordpress] Bitnami on AWS Lightsail - REST API endpoints not available #1348

Closed
sduckhor opened this issue Jan 9, 2024 · 8 comments
Closed
Assignees
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@sduckhor
Copy link

sduckhor commented Jan 9, 2024

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

36ff0ef5-ceb6-12e8-7c41-93f6b05626eb

bndiagnostic output

[Resources]
Your instance has little available RAM memory. total used free shared buff/cache available Mem: 1947 1060 127 118 758 601 Swap: 0 0 0

[Connectivity]
Server ports 22, 80 and/or 443 are not publicly accessible.

[Apache]
Found recent error or warning messages in the Apache error log.```[Tue Jan 09 13:20:48.578610 2024] [proxy:error] [pid XXXXXX:tid XXXXXXXXXXXXXX] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/bitnami/php/var/run/www.sock (www-fpm:8000) failed [Tue Jan 09 13:20:48.578656 2024] [proxy_fcgi:error] [pid XXXXXX:tid XXXXXXXXXXX] [client ip_address:XXXXX] AHXXXXXX: failed to make connection to backend: httpd-UDS

A high number of incoming requests originate from one or more unique IP addresses.

bndiagnostic was not useful. Could you please tell us why?

error messages indicate something else, but I am no professional, I hope the community can help

Describe your issue as much as you can

Hello community,

I have set up a Bitnami Multisite Wordpress installation on AWS Lightsail. I added HTTP, SSL and configured on Lightsail the DNS records. Also, I needed to change some redirect entries to www, to be able to have a naked domain for setting up a Multisite instance of Wordpress. This was done in the vhost folder. Then the agency setting up a Wordpress portal for us, copied all content to the server. Everything seems to be working fine, except if you want to create new objects.

Example 1:
Trying to update a plugin will result in error message (backend): No route was found matching the URL and request method.

Example 2:
Same error result when trying to access the REST API through https://example.domain/wp-json/wpml/tm/v1/ate/jobs/retry

Example 3:
Trying to create an additional sub-site on the Multisite results in attached error message (screenshot at the end).

I don't have an IT background, please be kind, if this issue might be easy to solve. The developer on agency side suggests that it has something to do with Bitnami security settings, because authentication is not working. Only for default Wordpress endpoints, but not for customized ones. This is why I am posting on here.

We followed this description to try an solve this issue: https://wordpress.stackexchange.com/questions/391539/keep-getting-401-error-from-wordpress-on-aws-lightsail

But unfortunately, it was not working. Additionally, the paths described in this link did not match the structure we encountered in the AWS Bitnami Set-up. Instead, we changed these files:
/opt/bitnami/stack/apache/conf/vhosts/wordpress-https-vhost.conf
/opt/bitnami/stack/apache/conf/vhosts/wordpress-vhost.conf

I hope, this will be sufficient information (including the error report from Bitnami diagnostics) to get to the bottom of this. Please note that I also created a support ticket at AWS.

Thanks a lot at everyone looking into this.

Cheers,

Susi

Screenshot 2024-01-09 at 14 27 45

@sduckhor sduckhor added the tech-issues The user has a technical issue about an application label Jan 9, 2024
@github-actions github-actions bot added the triage Triage is needed label Jan 9, 2024
@mdhont
Copy link

mdhont commented Jan 9, 2024

Did you configure the domain correctly? The following guide shows how to do that:

https://docs.bitnami.com/aws/apps/wordpress-multisite/configuration/configure-wordpress-multisite/

@sduckhor
Copy link
Author

Hi @mdhont,

I had a look at the guide and I have the issue of not having the same file structure here as well.

When trying to input

sudo /opt/bitnami/configure_app_domain --domain example.com

into the console (but with my domain inserted), it will say "command not found". I tried to find it in another folder, but couldn't. I attached a screenshot of the content of bitnami/stack. Bitnami itself only contains stack and htdocs. Is there a possibility to get "configure_app_domain" somewhere else or can I set the domain somewhere else? Can this cause the problems I am facing?

Is there a chance that the issue is, that I started with a Bitnami installation of Lightsail for Single Sites (there was no choice, when setting this up in Lightsail). I read in the documentation, that there is a stack from Bitnami for Multisites? Does this stack has (apart from the Multisite differences) other configurations?

Thanks for you help. I really appreciate it.

Cheers,

Susi

Screenshot 2024-01-10 at 08 28 02

@sduckhor
Copy link
Author

UPDATE:

We created a new Bitnami Multisite instance on AWS Lightsail and copied the content of wp-content and the database to the new instance. I updated the main app domain and voilá - a new site can be created. This issue is solved.

However - even with the new installation, the REST API endpoint problem is still existing. We cannot update Plugins and create new content - even Wordpress own content such as pages and posts.

Any idea, what we can try to fix the problem? What else needs to be considered, when integrating a Wordpress Multisite installation in a new Bitnami Multisite Stack?

I had a look at this article: https://docs.bitnami.com/aws/apps/wordpress-multisite/administration/use-htaccess/
And I thought maybe the installed plugins that we transferred to the site from the old one need additional entries in the htaccess file. Is this something, I could look into?

I appreciate any input and ideas. Thanks!

@mdhont
Copy link

mdhont commented Jan 12, 2024

Could you describe the exact steps to reproduce the issue using a fresh instance without any change in the configuration?

Is it possible to update the plugins using the wp tool?

wp plugin update PLUGINNAME

@sduckhor
Copy link
Author

Just wanted to let you know, that we fixed the problem. It seems to be a combination on wrong permissions, maybe htaccess file and symlinks.

It is working now, however we still have problems with plugins creating stuff, that has the wrong permission. I think, the most important thing is to follow the permission settings from bitnami.

@mdhont
Copy link

mdhont commented Jan 22, 2024

That's great, the following guide shows which permissions are expected:

https://docs.bitnami.com/aws/apps/wordpress/administration/understand-file-permissions/

Copy link

github-actions bot commented Feb 7, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Feb 7, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants