my env : Linux, maven, AWS EC2, Spring boot
I can see the main screen of the project when I connect to the Elastic IP of EC2. However, when I try to connect to the purchased .dev domain, I get an 403 error and Test Page of Apache.
I think, maybe I didn't enter the correct path. Or, The permission setting is incorrect.
So I modified the httpd.conf file, but it still doesn't solve the problem. Can you check which one is wrong?
Please Check my Code
The path to the file that needs to be executed is in "/home/ec2-user/project/src/main/WEB-INF/views/home.jsp".
etc/httpd/conf/httpd-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot "/home/ec2-user"
ServerName "test.dev"
ServerAlias "www.test.dev"
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/test.dev/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/test.dev/privkey.pem
</VirtualHost>
</IfModule>
etc/httpd/conf/httpd.conf
# set IP addresses
Listen 80
<VirtualHost *:80>
DocumentRoot "/home/ec2-user"
ServerName "test.dev"
ServerAlias "www.test.dev"
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.test.dev [OR]
RewriteCond %{SERVER_NAME} =test.dev
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# set Deny entirety <- default
<Directory />
AllowOverride none
Require all denied
</Directory>
# Directory custom setting
DocumentRoot "/home/ec2-user"
<Directory "/home/ec2-user">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
<Directory "/home/ec2-user">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
# Index position custom setting
<IfModule dir_module>
DirectoryIndex /project/src/main/webapp/WEB-INF/views/home.jsp
</IfModule>
Error log
[core:error] [pid 7748] (13)Permission denied: [client XXX.XXX.XXX.XXX]
AH00035: access to /project/src/main/webapp/WEB-INF/views/home.jsp denied
(filesystem path '/home/ec2-user/project/src') because search permissions are
missing on a component of the path
ec2-user's permissions enter image description here
project's permissions enter image description here