How to setup phpmyadmin?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0














My machine is running arch linux.



if I uncomment this line in my /etc/httpd/conf/httpd.conf :



 Include conf/extra/phpmyadmin.conf


phpmyadmin takes over my document root and when I go to localhost in my browser it just opens the phpmyadmin/index.php page and I no longer can access my projects in my DocumentRoot



but if I comment the above line in the server config, localhost opens my DocumentRoot and I can see all the php files and directories/projects I have created.



so for now I enable phpmyadim only to do the mysql things I want to do then disable it.



My question is : how can I enable phpmyadmin without it taking over my server ?



this is the /etc/httpd/conf/extra/phpmyadmin.conf file :



<VirtualHost pma.localhost:80>
ServerAdmin phpmyadmin@apache.com
DocumentRoot "/usr/share/webapps/phpMyAdmin"
ServerName pma.localhost
ServerAlias pma.localhost
ErrorLog "/var/log/httpd/pma.localhost-error_log"

<Directory "/usr/share/webapps/phpMyAdmin">
DirectoryIndex index.html index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
</VirtualHost>

Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>









share|improve this question




























    0














    My machine is running arch linux.



    if I uncomment this line in my /etc/httpd/conf/httpd.conf :



     Include conf/extra/phpmyadmin.conf


    phpmyadmin takes over my document root and when I go to localhost in my browser it just opens the phpmyadmin/index.php page and I no longer can access my projects in my DocumentRoot



    but if I comment the above line in the server config, localhost opens my DocumentRoot and I can see all the php files and directories/projects I have created.



    so for now I enable phpmyadim only to do the mysql things I want to do then disable it.



    My question is : how can I enable phpmyadmin without it taking over my server ?



    this is the /etc/httpd/conf/extra/phpmyadmin.conf file :



    <VirtualHost pma.localhost:80>
    ServerAdmin phpmyadmin@apache.com
    DocumentRoot "/usr/share/webapps/phpMyAdmin"
    ServerName pma.localhost
    ServerAlias pma.localhost
    ErrorLog "/var/log/httpd/pma.localhost-error_log"

    <Directory "/usr/share/webapps/phpMyAdmin">
    DirectoryIndex index.html index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
    </Directory>
    </VirtualHost>

    Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
    <Directory "/usr/share/webapps/phpMyAdmin">
    DirectoryIndex index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
    </Directory>









    share|improve this question


























      0












      0








      0







      My machine is running arch linux.



      if I uncomment this line in my /etc/httpd/conf/httpd.conf :



       Include conf/extra/phpmyadmin.conf


      phpmyadmin takes over my document root and when I go to localhost in my browser it just opens the phpmyadmin/index.php page and I no longer can access my projects in my DocumentRoot



      but if I comment the above line in the server config, localhost opens my DocumentRoot and I can see all the php files and directories/projects I have created.



      so for now I enable phpmyadim only to do the mysql things I want to do then disable it.



      My question is : how can I enable phpmyadmin without it taking over my server ?



      this is the /etc/httpd/conf/extra/phpmyadmin.conf file :



      <VirtualHost pma.localhost:80>
      ServerAdmin phpmyadmin@apache.com
      DocumentRoot "/usr/share/webapps/phpMyAdmin"
      ServerName pma.localhost
      ServerAlias pma.localhost
      ErrorLog "/var/log/httpd/pma.localhost-error_log"

      <Directory "/usr/share/webapps/phpMyAdmin">
      DirectoryIndex index.html index.php
      AllowOverride All
      Options FollowSymlinks
      Require all granted
      </Directory>
      </VirtualHost>

      Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
      <Directory "/usr/share/webapps/phpMyAdmin">
      DirectoryIndex index.php
      AllowOverride All
      Options FollowSymlinks
      Require all granted
      </Directory>









      share|improve this question















      My machine is running arch linux.



      if I uncomment this line in my /etc/httpd/conf/httpd.conf :



       Include conf/extra/phpmyadmin.conf


      phpmyadmin takes over my document root and when I go to localhost in my browser it just opens the phpmyadmin/index.php page and I no longer can access my projects in my DocumentRoot



      but if I comment the above line in the server config, localhost opens my DocumentRoot and I can see all the php files and directories/projects I have created.



      so for now I enable phpmyadim only to do the mysql things I want to do then disable it.



      My question is : how can I enable phpmyadmin without it taking over my server ?



      this is the /etc/httpd/conf/extra/phpmyadmin.conf file :



      <VirtualHost pma.localhost:80>
      ServerAdmin phpmyadmin@apache.com
      DocumentRoot "/usr/share/webapps/phpMyAdmin"
      ServerName pma.localhost
      ServerAlias pma.localhost
      ErrorLog "/var/log/httpd/pma.localhost-error_log"

      <Directory "/usr/share/webapps/phpMyAdmin">
      DirectoryIndex index.html index.php
      AllowOverride All
      Options FollowSymlinks
      Require all granted
      </Directory>
      </VirtualHost>

      Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
      <Directory "/usr/share/webapps/phpMyAdmin">
      DirectoryIndex index.php
      AllowOverride All
      Options FollowSymlinks
      Require all granted
      </Directory>






      apache-httpd phpmyadmin






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 20 '18 at 23:21









      jasonwryan

      49.2k14134184




      49.2k14134184










      asked Dec 20 '18 at 22:41









      Neo Mosaid

      3417




      3417




















          1 Answer
          1






          active

          oldest

          votes


















          1














          Your configuration looks strange to me but I've never worked with arch. I would suggest:



          Method 1 (Reinstall):



          1. Backup your MySQL Database!


          2. pacman -Rns phpmyadmin


          3. pacman -S phpmyadmin


          Be sure to follow the installer steps on screen!



          Method 2 (tinker with the configs):



          1. Setup a FQHN for this machine

          2. Make sure you actually setup VirtualHosts (your other projects) via
            sites-available/siteXY.conf and a2ensite siteXY.conf

          3. Test the configuration made in 2.) to verify you can access at least
            two different sites in your browser (www.projectXY-1.intranet / www.project-XY-2.intranet)

          4. Remove (comment or make backup before!) the VirtualHost-Section in
            your phpmyadmin.conf

          2.) and 3.) are to make sure you the cause doesn't lie in a misconfigured apache2.



          On the Arch Wiki you can also find examples how the phpmyadmin.conf should look like and other information.






          share|improve this answer






















          • I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
            – Neo Mosaid
            Dec 21 '18 at 12:39










          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%2f490226%2fhow-to-setup-phpmyadmin%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Your configuration looks strange to me but I've never worked with arch. I would suggest:



          Method 1 (Reinstall):



          1. Backup your MySQL Database!


          2. pacman -Rns phpmyadmin


          3. pacman -S phpmyadmin


          Be sure to follow the installer steps on screen!



          Method 2 (tinker with the configs):



          1. Setup a FQHN for this machine

          2. Make sure you actually setup VirtualHosts (your other projects) via
            sites-available/siteXY.conf and a2ensite siteXY.conf

          3. Test the configuration made in 2.) to verify you can access at least
            two different sites in your browser (www.projectXY-1.intranet / www.project-XY-2.intranet)

          4. Remove (comment or make backup before!) the VirtualHost-Section in
            your phpmyadmin.conf

          2.) and 3.) are to make sure you the cause doesn't lie in a misconfigured apache2.



          On the Arch Wiki you can also find examples how the phpmyadmin.conf should look like and other information.






          share|improve this answer






















          • I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
            – Neo Mosaid
            Dec 21 '18 at 12:39















          1














          Your configuration looks strange to me but I've never worked with arch. I would suggest:



          Method 1 (Reinstall):



          1. Backup your MySQL Database!


          2. pacman -Rns phpmyadmin


          3. pacman -S phpmyadmin


          Be sure to follow the installer steps on screen!



          Method 2 (tinker with the configs):



          1. Setup a FQHN for this machine

          2. Make sure you actually setup VirtualHosts (your other projects) via
            sites-available/siteXY.conf and a2ensite siteXY.conf

          3. Test the configuration made in 2.) to verify you can access at least
            two different sites in your browser (www.projectXY-1.intranet / www.project-XY-2.intranet)

          4. Remove (comment or make backup before!) the VirtualHost-Section in
            your phpmyadmin.conf

          2.) and 3.) are to make sure you the cause doesn't lie in a misconfigured apache2.



          On the Arch Wiki you can also find examples how the phpmyadmin.conf should look like and other information.






          share|improve this answer






















          • I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
            – Neo Mosaid
            Dec 21 '18 at 12:39













          1












          1








          1






          Your configuration looks strange to me but I've never worked with arch. I would suggest:



          Method 1 (Reinstall):



          1. Backup your MySQL Database!


          2. pacman -Rns phpmyadmin


          3. pacman -S phpmyadmin


          Be sure to follow the installer steps on screen!



          Method 2 (tinker with the configs):



          1. Setup a FQHN for this machine

          2. Make sure you actually setup VirtualHosts (your other projects) via
            sites-available/siteXY.conf and a2ensite siteXY.conf

          3. Test the configuration made in 2.) to verify you can access at least
            two different sites in your browser (www.projectXY-1.intranet / www.project-XY-2.intranet)

          4. Remove (comment or make backup before!) the VirtualHost-Section in
            your phpmyadmin.conf

          2.) and 3.) are to make sure you the cause doesn't lie in a misconfigured apache2.



          On the Arch Wiki you can also find examples how the phpmyadmin.conf should look like and other information.






          share|improve this answer














          Your configuration looks strange to me but I've never worked with arch. I would suggest:



          Method 1 (Reinstall):



          1. Backup your MySQL Database!


          2. pacman -Rns phpmyadmin


          3. pacman -S phpmyadmin


          Be sure to follow the installer steps on screen!



          Method 2 (tinker with the configs):



          1. Setup a FQHN for this machine

          2. Make sure you actually setup VirtualHosts (your other projects) via
            sites-available/siteXY.conf and a2ensite siteXY.conf

          3. Test the configuration made in 2.) to verify you can access at least
            two different sites in your browser (www.projectXY-1.intranet / www.project-XY-2.intranet)

          4. Remove (comment or make backup before!) the VirtualHost-Section in
            your phpmyadmin.conf

          2.) and 3.) are to make sure you the cause doesn't lie in a misconfigured apache2.



          On the Arch Wiki you can also find examples how the phpmyadmin.conf should look like and other information.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 21 '18 at 0:16









          kemotep

          2,0313620




          2,0313620










          answered Dec 20 '18 at 23:20









          bortran

          1261




          1261











          • I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
            – Neo Mosaid
            Dec 21 '18 at 12:39
















          • I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
            – Neo Mosaid
            Dec 21 '18 at 12:39















          I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
          – Neo Mosaid
          Dec 21 '18 at 12:39




          I used the configuration provided in arch wiki and its working fine . I don't know how I missed it the first time. thanks
          – Neo Mosaid
          Dec 21 '18 at 12:39

















          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%2f490226%2fhow-to-setup-phpmyadmin%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

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay