Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Guru5005's avatar

Laravel AWS, Setting up phpMyAdmin issue

Hi all,

i have hosted my laravel app in aws EC2 instance (Linux 2),

after hosting i changed the Document root from /var/www/html to /var/www/my_project/public as it will be the root folder for laravel, it is working perfectly fine.

I have followed the tutorial for LAMP Stack from this link

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

My issue is setting up the phpMyAdmin from rds, i have initiated rds also, right now the phpMyAdmin is in folder /var/www/html/.

So when i go to my_ip_address/phpMyAdmin i must be able to see the login page for phpMyAdmin, but i am getting error as

Not Found. The requested URL /phpMyAdmin was not found on this server.

is there any thing i am missing ?? like configuring the phpMyAdmin with EC2? i have gone through google almost 3 pages , but could not solve the issue.

Any help will be appreciated,

Thank you

0 likes
4 replies
ftiersch's avatar
ftiersch
Best Answer
Level 28

If you have set your document root to be in /my_project/public the webserver starts looking there for your subfolders (that's why it's called "root"). So either you need to put your phpmyadmin into your public directory or you need a vhost for phpmyadmin with a different root directory.

Guru5005's avatar

@ftiersch thank you for tour response , is it good practice to move the phpMyAdmin to the public folder ?

ftiersch's avatar

@TECHGURU - To be honest I haven't used phpmyadmin in years. Usually I use something like HeidiSQL (or SequelPro if you are on a Mac) and then connect to the database through an SSH tunnel for security reasons.

But if you make sure that your phpmyadmin is password secured I don't see a problem with it.

Please or to participate in this conversation.