问题
currently phpmyadmin is located at www.website.com/phpmyadmin on an apache server but I'm wondering if it is possible to have it located outside the html folder and in a different directory but having it possible to access it myself to make changes?
回答1:
yes, you can! Move it wherever you want. Then go to /etc/httpd/conf.d and create a new configuration file (maybe phpmyadmin.conf) and edit it. For instance, if you choose to move it to /usr/share/phpMyAdmin, the configuration file can be as follows:
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
Options none
AllowOverride Limit
Require all granted
</Directory>
<Directory /usr/share/phpMyAdmin/>
Options none
AllowOverride Limit
Require all granted
</Directory>
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
Greetings
来源:https://stackoverflow.com/questions/28431926/is-it-possible-to-move-phpmyadmin-to-outside-the-root-folder