AWS Opsworks Java App Server Error 403

I am new to AWS Opsworks. I am trying to deploy a basic AWS Opsworks application using Java App Server by doing the following:

I did everything that was mentioned, but when I deploy and try to view the url, it says: Forbidden You do not have permission to access /JavaBasic/HelloWorldService.jsp on this server.

Can anyone guide me on how I should solve this?


source to share

1 answer

From what I remember seeing in the Apache documentation, you need to change the permissions on the file so that all users, even those not logged in, can see it. This way you can access it through the browser as it is a no login connection.

The following command should do the trick:

sudo chmod -R  755 /path/to/www


Where /path/to/www

is the absolute path from the root to the topmost file directory on the website. Using Apache2 it looks like it will /var/www

, although it might be different for you.

Note that you will need to have a password for the root account for sudo

; if you don't, try without it and it's all the same.

EDIT: After doing a bit of research, I figured that you only need to give the user www-data

permission to view the pages, as this is what Apache uses. Setting permission to not 755

will do this, but any solution that makes it www-data

possible to read the file will do the same. For example, this will also work, assuming Apache is using www-data


sudo chown -R www-data /path/to/www


Again, this /path/to/www

must be an absolute path to the root of your site, and you need a password for the account root




All Articles