0

With Apache 2.4, PHP7 & Phpmyadmin on a Windows Server 2016 VM: unable to properly configure phpmyadmin to be accessible as path from site. Site is a Symfony application that throws a 404 when site/phpmyadmin is requested.

mod_alias is loaded

httpd-vhost.conf

<VirtualHost *:80>
    ServerName admin.projectmana.org
    ServerAlias projectmana.org
    DocumentRoot "c:\apache24\htdocs\projectmana\htdocs"
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin projectmana.app@gmail.com
    ServerName admin.projectmana.org
    Alias /phpmyadmin "c:/Apache24/htdocs/phpmyadmin"
    <Directory "c:/Apache24/htdocs/phpmyadmin">
    </Directory>
</VirtualHost>

Edit

Result of httpd -S (after Include conf/extra/httpd-vhosts.conf)

VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server admin.projectmana.org (C:/Apache24/conf/extra/httpd-vhosts.conf:24)
         port 80 namevhost admin.projectmana.org (C:/Apache24/conf/extra/httpd-vhosts.conf:24)
                 alias projectmana.org
         port 80 namevhost admin.projectmana.org (C:/Apache24/conf/extra/httpd-vhosts.conf:30)
ServerRoot: "C:/Apache24"
Main DocumentRoot: "C:/Apache24/htdocs/projectMana/htdocs"
Main ErrorLog: "C:/Apache24/logs/error.log"
Mutex default: dir="C:/Apache24/logs/" mechanism=default
Mutex rewrite-map: using_defaults
PidFile: "C:/Apache24/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
0

With the help from this Ubuntu forums answer, I made the following the sole entry in httpd-vhosts.conf:

<VirtualHost *:80>
    ServerName admin.projectmana.org
    ServerAlias projectmana.org
    DocumentRoot "c:\apache24\htdocs\projectMana\htdocs"
    Alias /phpmyadmin "c:/Apache24/htdocs/phpmyadmin"
    <Directory "c:/Apache24/htdocs/phpmyadmin">
        Options Indexes FollowSymLinks MultiViews
        DirectoryIndex index.php
        AllowOverride all
        Require all granted
    </Directory>
</VirtualHost>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.