I'm trying to run laravel on EC2(AWS linux 2) and apache server. And I recently bought a domain from Namecheap
And I installed laravel to var/www/html folder.
My /etc/httpd/conf/httpd.conf has those lines,
DocumentRoot "/var/www/html/public"
<Directory "/var/www/html">
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
And this is my /etc/httpd/conf.d/vhost.conf is this
<VirtualHost *:80>
ServerName mydomain.store
ServerAlias https://www.mydomain.store
DocumentRoot /var/www/html/public
ServerAdmin mailto:[email protected]
<Directory /var/www/html>
AllowOverride All
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.store [OR]
RewriteCond %{SERVER_NAME} =https://www.mydomain.store
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
And I added SSL via sudo certbot --apache
And when I add like this in browser (Not real IP) http://18.181.183.11/ my app works fine. But when I add https://mydomain.store in browser I get file structure like this,
And when I add https://mydomain.store/public in browser app works.
Does anyone know why?

