-3

My phpMyadmin installed from portmaster works just fine execpt when I omit the trailing slash from the main URL, I got a not found error :

http://192.168.1.161/phpmyadmin

This link does not work and displays this error :

Not Found

The requested URL /phpmyadmin was not found on this server.

Here is my configuration :

Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"

<Directory "/usr/local/www/phpMyAdmin/">
Order allow,deny
Allow from all
DirectoryIndex index.php
Options -Indexes
options -FollowSymLinks
AllowOverride all
Require ip 192.168 127.0.0.1
</Directory>

Can you please help me with this ? thank you.

5
  • .. Why don't you just use it with a trailing slash?
    – Frederik
    Jul 15, 2015 at 11:20
  • Not every single user is aware of it, other links works just fine with or without the trailing slash which is the normal behaviour. Jul 15, 2015 at 11:38
  • 1
    Alias /phpmyadmin "/usr/local/www/phpMyAdmin/" ?
    – yagmoth555
    Jul 15, 2015 at 12:28
  • Already tried but no success. Jul 15, 2015 at 12:42
  • to yagmoth555 : it is quit odd but I tried Alias modification before you post it but it did not work at the time, hours later it worked, I guess because I did not restart Apache at the moment, but anyway thank you for your help. Jul 16, 2015 at 10:02

2 Answers 2

0

Use one of these:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*[^/]$ /$1/ [L,R=301]

or

DirectorySlash On

The first needs mod_rewrite enabled, the second needs mod_dir.

1
  • Unfortunately it does not work, it was one of the first tweaks I tried. Jul 15, 2015 at 13:38
0

I found it by myself this time, this did the trick :

Replace this :

Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"

With this :

Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"

I had simply to remove the trailing slash from the Alias.

Thanks for everyone, I hope this will help someone someday.

3
  • 2
    That is exactly what Yagmoth suggested in a comment above, which you claimed you had tried unsuccessfully. Accuracy is important in sysadmin.
    – MadHatter
    Jul 16, 2015 at 14:27
  • did you take the time to read my comment in response to Yagmoth ? Jul 23, 2015 at 15:24
  • Assuming you mean that dated 2015-07-16 10:02, then no, because you hadn't written it when I made my comment above, and I had no way of knowing you'd written it since. Having now read it, I'm confirmed in my opinion that this question is off-topic, since I feel that anyone who doesn't know that apache needs to be told to re-read its config file has no business managing apache systems in a business environment.
    – MadHatter
    Jul 23, 2015 at 17:40

Not the answer you're looking for? Browse other questions tagged .