Accessing PHPMyAdmin as installed by its distro package-index from the domain of each website












3














I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu.



If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/phpmyadmin/ I think) then I wouldn't be able to navigate to PMA based on domains of my websites hosted on that lamp (the following will error):



example-1.com/phpmyadmin
example-2.com/phpmyadmin


If I remember correctly, I'll have to navigate via say MY_IP_ADDRESS/usr/share/phpmyadmin/ to access PMA successfully.



But if I'll install PMA directly on the document root via the following way I would indeed be able to navigate to PMA based on domains (as shown above):



pma="[pP][hH][pP][mM][yY][aA][dD][mM][iI][nN]"
cd /var/www/html/
rm -rf ${pma}*
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
unzip ${pma}*.zip
mv ${pma}*/ phpmyadmin/
rm ${pma}*.zip
unset pma
cd


On the one hand, installing PMA with apt install phpmyadmin is simple and convenient. On the other hand but doesn't let me navigate to it based on domains. On the other hand, I do want to navigate to it just based on domains.



If I'm not wrong, a symlink can be helpful. Am I in the right direction (I can't test now)?










share|improve this question
























  • Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
    – Shadur
    Dec 19 '18 at 7:47










  • Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
    – JohnDoea
    Dec 19 '18 at 8:05










  • There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
    – Shadur
    Dec 19 '18 at 8:21










  • Question updated per that comment, @Shadur. Thank you,
    – JohnDoea
    Dec 19 '18 at 8:25
















3














I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu.



If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/phpmyadmin/ I think) then I wouldn't be able to navigate to PMA based on domains of my websites hosted on that lamp (the following will error):



example-1.com/phpmyadmin
example-2.com/phpmyadmin


If I remember correctly, I'll have to navigate via say MY_IP_ADDRESS/usr/share/phpmyadmin/ to access PMA successfully.



But if I'll install PMA directly on the document root via the following way I would indeed be able to navigate to PMA based on domains (as shown above):



pma="[pP][hH][pP][mM][yY][aA][dD][mM][iI][nN]"
cd /var/www/html/
rm -rf ${pma}*
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
unzip ${pma}*.zip
mv ${pma}*/ phpmyadmin/
rm ${pma}*.zip
unset pma
cd


On the one hand, installing PMA with apt install phpmyadmin is simple and convenient. On the other hand but doesn't let me navigate to it based on domains. On the other hand, I do want to navigate to it just based on domains.



If I'm not wrong, a symlink can be helpful. Am I in the right direction (I can't test now)?










share|improve this question
























  • Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
    – Shadur
    Dec 19 '18 at 7:47










  • Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
    – JohnDoea
    Dec 19 '18 at 8:05










  • There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
    – Shadur
    Dec 19 '18 at 8:21










  • Question updated per that comment, @Shadur. Thank you,
    – JohnDoea
    Dec 19 '18 at 8:25














3












3








3


0





I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu.



If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/phpmyadmin/ I think) then I wouldn't be able to navigate to PMA based on domains of my websites hosted on that lamp (the following will error):



example-1.com/phpmyadmin
example-2.com/phpmyadmin


If I remember correctly, I'll have to navigate via say MY_IP_ADDRESS/usr/share/phpmyadmin/ to access PMA successfully.



But if I'll install PMA directly on the document root via the following way I would indeed be able to navigate to PMA based on domains (as shown above):



pma="[pP][hH][pP][mM][yY][aA][dD][mM][iI][nN]"
cd /var/www/html/
rm -rf ${pma}*
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
unzip ${pma}*.zip
mv ${pma}*/ phpmyadmin/
rm ${pma}*.zip
unset pma
cd


On the one hand, installing PMA with apt install phpmyadmin is simple and convenient. On the other hand but doesn't let me navigate to it based on domains. On the other hand, I do want to navigate to it just based on domains.



If I'm not wrong, a symlink can be helpful. Am I in the right direction (I can't test now)?










share|improve this question















I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu.



If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/phpmyadmin/ I think) then I wouldn't be able to navigate to PMA based on domains of my websites hosted on that lamp (the following will error):



example-1.com/phpmyadmin
example-2.com/phpmyadmin


If I remember correctly, I'll have to navigate via say MY_IP_ADDRESS/usr/share/phpmyadmin/ to access PMA successfully.



But if I'll install PMA directly on the document root via the following way I would indeed be able to navigate to PMA based on domains (as shown above):



pma="[pP][hH][pP][mM][yY][aA][dD][mM][iI][nN]"
cd /var/www/html/
rm -rf ${pma}*
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
unzip ${pma}*.zip
mv ${pma}*/ phpmyadmin/
rm ${pma}*.zip
unset pma
cd


On the one hand, installing PMA with apt install phpmyadmin is simple and convenient. On the other hand but doesn't let me navigate to it based on domains. On the other hand, I do want to navigate to it just based on domains.



If I'm not wrong, a symlink can be helpful. Am I in the right direction (I can't test now)?







debian apache-httpd symlink architecture phpmyadmin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 19 '18 at 8:32

























asked Dec 19 '18 at 6:07









JohnDoea

1001132




1001132












  • Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
    – Shadur
    Dec 19 '18 at 7:47










  • Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
    – JohnDoea
    Dec 19 '18 at 8:05










  • There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
    – Shadur
    Dec 19 '18 at 8:21










  • Question updated per that comment, @Shadur. Thank you,
    – JohnDoea
    Dec 19 '18 at 8:25


















  • Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
    – Shadur
    Dec 19 '18 at 7:47










  • Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
    – JohnDoea
    Dec 19 '18 at 8:05










  • There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
    – Shadur
    Dec 19 '18 at 8:21










  • Question updated per that comment, @Shadur. Thank you,
    – JohnDoea
    Dec 19 '18 at 8:25
















Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
– Shadur
Dec 19 '18 at 7:47




Your premise assumption is mistaken. Unless your distro's package management is utterly insane, it won't install the entirety of PMA into /etc/ - just the config files, at most. Any further explanation will depend on which distro you use and how their package management delivers PMA.
– Shadur
Dec 19 '18 at 7:47












Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
– JohnDoea
Dec 19 '18 at 8:05




Maybe I confused /etc with some other dir like /bin/ or /usr/, but it should be one of those, AFAIR.
– JohnDoea
Dec 19 '18 at 8:05












There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
– Shadur
Dec 19 '18 at 8:21




There are fundamental and crucial differences between the nature of /etc/ on one hand and /usr/share or /bin/ on the other. I'll try to write an answer, but you may want to add the debian tag to this question because it's going to be distro-specific...
– Shadur
Dec 19 '18 at 8:21












Question updated per that comment, @Shadur. Thank you,
– JohnDoea
Dec 19 '18 at 8:25




Question updated per that comment, @Shadur. Thank you,
– JohnDoea
Dec 19 '18 at 8:25










2 Answers
2






active

oldest

votes


















5














In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.



What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets up the specifics PMA needs to run properly. You can look into it on your own time if you want the details, but what it boils down to is that from that point on PMA can and will work with every site you configure that has working PHP available, simply by adding the following line to the <VirtualHost> directive:



Alias /phpmyadmin /usr/share/phpmyadmin


At that point PMA should work for that site without any further actions required.



(Also, drat. Ninja'd.)






share|improve this answer























  • One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
    – Stephen Kitt
    Dec 20 '18 at 11:03



















5














The Debian PHPMyAdmin packages install the main contents under /usr/share/phpmyadmin. That is made available through web server configuration; for example, if you’re using Apache HTTPD, /etc/phpmyadmin/apache.conf is linked to /etc/apache2/conf-available/phpmyadmin.conf, and that can be enabled or disabled using a2enconf or a2disconf. (The preferred, documented method for interactive configuration is dpkg-reconfigure -plow phpmyadmin.)



If your web sites are configured as virtual hosts, you should be able to provide access to /phpmyadmin in all of them by configuring them in a similar fashion; in fact as far as I can tell that should be the default situation, if the PHPMyAdmin configuration is enabled:



Alias /phpmyadmin /usr/share/phpmyadmin


As is often the case, the package’s README.Debian contains useful information and is worth reading (see /usr/share/doc/phpmyadmin/README.Debian.gz on your system).






share|improve this answer





















  • Drat, ninja'd. Have a +1, good sir.
    – Shadur
    Dec 19 '18 at 8:29










  • Reciprocated ;-).
    – Stephen Kitt
    Dec 19 '18 at 8:32











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489831%2faccessing-phpmyadmin-as-installed-by-its-distro-package-index-from-the-domain-of%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.



What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets up the specifics PMA needs to run properly. You can look into it on your own time if you want the details, but what it boils down to is that from that point on PMA can and will work with every site you configure that has working PHP available, simply by adding the following line to the <VirtualHost> directive:



Alias /phpmyadmin /usr/share/phpmyadmin


At that point PMA should work for that site without any further actions required.



(Also, drat. Ninja'd.)






share|improve this answer























  • One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
    – Stephen Kitt
    Dec 20 '18 at 11:03
















5














In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.



What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets up the specifics PMA needs to run properly. You can look into it on your own time if you want the details, but what it boils down to is that from that point on PMA can and will work with every site you configure that has working PHP available, simply by adding the following line to the <VirtualHost> directive:



Alias /phpmyadmin /usr/share/phpmyadmin


At that point PMA should work for that site without any further actions required.



(Also, drat. Ninja'd.)






share|improve this answer























  • One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
    – Stephen Kitt
    Dec 20 '18 at 11:03














5












5








5






In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.



What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets up the specifics PMA needs to run properly. You can look into it on your own time if you want the details, but what it boils down to is that from that point on PMA can and will work with every site you configure that has working PHP available, simply by adding the following line to the <VirtualHost> directive:



Alias /phpmyadmin /usr/share/phpmyadmin


At that point PMA should work for that site without any further actions required.



(Also, drat. Ninja'd.)






share|improve this answer














In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.



What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets up the specifics PMA needs to run properly. You can look into it on your own time if you want the details, but what it boils down to is that from that point on PMA can and will work with every site you configure that has working PHP available, simply by adding the following line to the <VirtualHost> directive:



Alias /phpmyadmin /usr/share/phpmyadmin


At that point PMA should work for that site without any further actions required.



(Also, drat. Ninja'd.)







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 19 '18 at 12:47

























answered Dec 19 '18 at 8:29









Shadur

19.4k74357




19.4k74357












  • One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
    – Stephen Kitt
    Dec 20 '18 at 11:03


















  • One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
    – Stephen Kitt
    Dec 20 '18 at 11:03
















One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
– Stephen Kitt
Dec 20 '18 at 11:03




One clarification since it appears to have caused some confusion: the alias is configured by default, it doesn’t need to be added to each virtual host. (See my answer.)
– Stephen Kitt
Dec 20 '18 at 11:03













5














The Debian PHPMyAdmin packages install the main contents under /usr/share/phpmyadmin. That is made available through web server configuration; for example, if you’re using Apache HTTPD, /etc/phpmyadmin/apache.conf is linked to /etc/apache2/conf-available/phpmyadmin.conf, and that can be enabled or disabled using a2enconf or a2disconf. (The preferred, documented method for interactive configuration is dpkg-reconfigure -plow phpmyadmin.)



If your web sites are configured as virtual hosts, you should be able to provide access to /phpmyadmin in all of them by configuring them in a similar fashion; in fact as far as I can tell that should be the default situation, if the PHPMyAdmin configuration is enabled:



Alias /phpmyadmin /usr/share/phpmyadmin


As is often the case, the package’s README.Debian contains useful information and is worth reading (see /usr/share/doc/phpmyadmin/README.Debian.gz on your system).






share|improve this answer





















  • Drat, ninja'd. Have a +1, good sir.
    – Shadur
    Dec 19 '18 at 8:29










  • Reciprocated ;-).
    – Stephen Kitt
    Dec 19 '18 at 8:32
















5














The Debian PHPMyAdmin packages install the main contents under /usr/share/phpmyadmin. That is made available through web server configuration; for example, if you’re using Apache HTTPD, /etc/phpmyadmin/apache.conf is linked to /etc/apache2/conf-available/phpmyadmin.conf, and that can be enabled or disabled using a2enconf or a2disconf. (The preferred, documented method for interactive configuration is dpkg-reconfigure -plow phpmyadmin.)



If your web sites are configured as virtual hosts, you should be able to provide access to /phpmyadmin in all of them by configuring them in a similar fashion; in fact as far as I can tell that should be the default situation, if the PHPMyAdmin configuration is enabled:



Alias /phpmyadmin /usr/share/phpmyadmin


As is often the case, the package’s README.Debian contains useful information and is worth reading (see /usr/share/doc/phpmyadmin/README.Debian.gz on your system).






share|improve this answer





















  • Drat, ninja'd. Have a +1, good sir.
    – Shadur
    Dec 19 '18 at 8:29










  • Reciprocated ;-).
    – Stephen Kitt
    Dec 19 '18 at 8:32














5












5








5






The Debian PHPMyAdmin packages install the main contents under /usr/share/phpmyadmin. That is made available through web server configuration; for example, if you’re using Apache HTTPD, /etc/phpmyadmin/apache.conf is linked to /etc/apache2/conf-available/phpmyadmin.conf, and that can be enabled or disabled using a2enconf or a2disconf. (The preferred, documented method for interactive configuration is dpkg-reconfigure -plow phpmyadmin.)



If your web sites are configured as virtual hosts, you should be able to provide access to /phpmyadmin in all of them by configuring them in a similar fashion; in fact as far as I can tell that should be the default situation, if the PHPMyAdmin configuration is enabled:



Alias /phpmyadmin /usr/share/phpmyadmin


As is often the case, the package’s README.Debian contains useful information and is worth reading (see /usr/share/doc/phpmyadmin/README.Debian.gz on your system).






share|improve this answer












The Debian PHPMyAdmin packages install the main contents under /usr/share/phpmyadmin. That is made available through web server configuration; for example, if you’re using Apache HTTPD, /etc/phpmyadmin/apache.conf is linked to /etc/apache2/conf-available/phpmyadmin.conf, and that can be enabled or disabled using a2enconf or a2disconf. (The preferred, documented method for interactive configuration is dpkg-reconfigure -plow phpmyadmin.)



If your web sites are configured as virtual hosts, you should be able to provide access to /phpmyadmin in all of them by configuring them in a similar fashion; in fact as far as I can tell that should be the default situation, if the PHPMyAdmin configuration is enabled:



Alias /phpmyadmin /usr/share/phpmyadmin


As is often the case, the package’s README.Debian contains useful information and is worth reading (see /usr/share/doc/phpmyadmin/README.Debian.gz on your system).







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 19 '18 at 8:24









Stephen Kitt

164k24365444




164k24365444












  • Drat, ninja'd. Have a +1, good sir.
    – Shadur
    Dec 19 '18 at 8:29










  • Reciprocated ;-).
    – Stephen Kitt
    Dec 19 '18 at 8:32


















  • Drat, ninja'd. Have a +1, good sir.
    – Shadur
    Dec 19 '18 at 8:29










  • Reciprocated ;-).
    – Stephen Kitt
    Dec 19 '18 at 8:32
















Drat, ninja'd. Have a +1, good sir.
– Shadur
Dec 19 '18 at 8:29




Drat, ninja'd. Have a +1, good sir.
– Shadur
Dec 19 '18 at 8:29












Reciprocated ;-).
– Stephen Kitt
Dec 19 '18 at 8:32




Reciprocated ;-).
– Stephen Kitt
Dec 19 '18 at 8:32


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489831%2faccessing-phpmyadmin-as-installed-by-its-distro-package-index-from-the-domain-of%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre