1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
First, make sure you have WordPress content in the document root of your web server.
For example, is index.php placed directly under the document root?
I would also need to check the permissions for WordPress content.
As for the other part to check, please check if the EC2 security group allows access from the ALB.
Relevant content
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago
Thank you for looking into this Riku. I checked through command prompt and the location of WordPress files is /var/app/current/ after I ran /usr/share/nginx/html/ since I chose Nginx as the web server. I'm confused because when I deployed the WordPress files in zip file, I made sure that the files are in the document root. Maybe it's the Elastic Beanstalk was the one who transferred the files. I can also confirm that the security group of my EC2 instance allows http in port 80 from ALB.
Below are the permissions: -rw-r--r--. 1 webapp webapp 405 Feb 6 2020 index.php -rw-r--r--. 1 webapp webapp 19915 Jan 1 2023 license.txt -rw-r--r--. 1 webapp webapp 7402 Mar 5 00:52 readme.html -rw-r--r--. 1 webapp webapp 7205 Sep 16 2022 wp-activate.php drwxr-xr-x. 9 webapp webapp 16384 Aug 17 09:42 wp-admin -rw-r--r--. 1 webapp webapp 351 Feb 6 2020 wp-blog-header.php -rw-r--r--. 1 webapp webapp 2338 Nov 9 2021 wp-comments-post.php -rw-rw-rw-. 1 webapp webapp 3497 Aug 19 17:00 wp-config.php -rw-r--r--. 1 webapp webapp 3013 Feb 23 10:38 wp-config-sample.php drwxr-xr-x. 4 webapp webapp 52 Aug 17 12:00 wp-content -rw-r--r--. 1 webapp webapp 5536 Nov 23 2022 wp-cron.php drwxr-xr-x. 28 webapp webapp 16384 Aug 17 09:42 wp-includes -rw-r--r--. 1 webapp webapp 2502 Nov 26 2022 wp-links-opml.php -rw-r--r--. 1 webapp webapp 3792 Feb 23 10:38 wp-load.php -rw-r--r--. 1 webapp webapp 49330 Feb 23 10:38 wp-login.php -rw-r--r--. 1 webapp webapp 8541 Feb 3 2023
Thanks for sharing. Would it improve if I run the following command to change the permissions on WordPress content?
The error is still the same. Below are the changes in permissions: -rwxr-xr-x. 1 webapp webapp 405 Feb 6 2020 index.php -rwxr-xr-x. 1 webapp webapp 19915 Jan 1 2023 license.txt -rwxr-xr-x. 1 webapp webapp 7402 Mar 5 00:52 readme.html -rwxr-xr-x. 1 webapp webapp 7205 Sep 16 2022 wp-activate.php drwxr-xr-x. 9 webapp webapp 16384 Aug 17 09:42 wp-admin -rwxr-xr-x. 1 webapp webapp 351 Feb 6 2020 wp-blog-header.php -rwxr-xr-x. 1 webapp webapp 2338 Nov 9 2021 wp-comments-post.php -rwxr-xr-x. 1 webapp webapp 3497 Aug 19 17:00 wp-config.php -rwxr-xr-x. 1 webapp webapp 3013 Feb 23 10:38 wp-config-sample.php drwxr-xr-x. 4 webapp webapp 52 Aug 17 12:00 wp-content -rwxr-xr-x. 1 webapp webapp 5536 Nov 23 2022 wp-cron.php drwxr-xr-x. 28 webapp webapp 16384 Aug 17 09:42 wp-includes -rwxr-xr-x. 1 webapp webapp 2502 Nov 26 2022 wp-links-opml.php -rwxr-xr-x. 1 webapp webapp 3792 Feb 23 10:38 wp-load.php -rwxr-xr-x. 1 webapp webapp 49330 Feb 23 10:38 wp-login.php -rwxr-xr-x. 1 webapp webapp 8541 Feb 3 2023 wp-mail.php -rwxr-xr-x. 1 webapp webapp 24993 Mar 1 15:05 wp-settings.php -rwxr-xr-x. 1 webapp webapp 34350 Sep 17 2022 wp-signup.php -rwxr-xr-x. 1 webapp webapp 4889 Nov 23 2022 wp-trackback.php -rwxr-xr-x. 1 webapp webapp 3238 Nov 29 2022 xmlrpc.php
Can you check the Nginx config file to see the exact document root location?
It is under /var/app/current of nginx as shown below in the command prompt: [ec2-user@ip-10-0-148-48 ~]$ cd /usr/share/nginx/html [ec2-user@ip-10-0-148-48 html]$ cd /var/app/current [ec2-user@ip-10-0-148-48 current]$ ls index.php wp-admin wp-config-sample.php wp-links-opml.php wp-settings.php license.txt wp-blog-header.php wp-content wp-load.php wp-signup.php readme.html wp-comments-post.php wp-cron.php wp-login.php wp-trackback.php wp-activate.php wp-config.php wp-includes wp-mail.php xmlrpc.php