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

HUGE_DICK_10_INCHES's avatar

Access Forbidden You don't have permission to access /phpmyadmin/ on this server - with laravel

I just installed lamp on cent os 6.5 and installed laravel.

I added .htaccess to root directory in laravel app with this:

<IfModule mod_rewrite.c>
   RewriteEngine On 
   RewriteRule ^(.*)$ public/ [L]
</IfModule>

Now when I want to access domain-name.com/phpmyadmin/ I get Access Forbidden You don't have permission to access /phpmyadmin/ on this server

How can I resolve that?

Without laravel it was working.

0 likes
3 replies
D9705996's avatar

Its hard to tell with the limited configuration shown the exact problem you face but I managed to install phpmyadmin doing the following

My Apache configuration is setup in /etc/httpd/conf.d/laravel.conf

<VirtualHost *:80>
  DocumentRoot "/var/www/html/public"

  <Directory "/var/www/html/public">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]

  </Directory>
</VirtualHost>

Make sure you restart httpd service after making any changes

I downloaded the latest tar.gz file from phpMyAdmin, extracted using tar zxf phpMyAdmin-4.8.3-all-languages.tar.gz and moved to /var/www/html/public/phpmyadmin using mv phpMyAdmin-4.8.3-all-languages /var/www/html/public/phpmyadmin and was able to access the application using http://domain-name.com/phpmyadmin/

Tray2's avatar

I would but phpmyadmin in another virtual host with port 8080 and your laravel app in another with port 80 that way they'll never fight.

D9705996's avatar

@Tray2 - agreed - Above just a simple test in a dev lab to make sure it works :D

Please or to participate in this conversation.