LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Accessing phpmyadmin on a live server (https://www.linuxquestions.org/questions/linux-server-73/accessing-phpmyadmin-on-a-live-server-519574/)

iaingblack 01-15-2007 04:09 PM

Accessing phpmyadmin on a live server
 
Hi everyone. I am currently experimenting and running my own webserver for me and a friend but have hit a little snag... I was hoping to do some database programming and so installed phpmyadmin and I was hoping to access things fairly easily but my self-inflicted apache setup prevents it and i'm not sure how to get round it.

Just in case it matters, I have BIND running with 2 zones, lets call them test1.co.uk and test2.co.uk (not ready to reveal my sites to the world just yet!). I have pointed my domain names to use the server as their name server and BIND just forwards www, ftp, ns1, ns2 and mail requests to itself. Nothing fancy in the slightest.

My apache NameVirtualHost setup is as follows.

NameVirtualHost myipaddress

<VirtualHost myipaddress>
ServerName www.test1.co.uk
ServerAlias test1.co.uk *.test1.co.uk
DocumentRoot /var/www/test1
</VirtualHost>

<VirtualHost myipaddress>
ServerName www.test2.co.uk
ServerAlias test2.co.uk *.test2.co.uk
DocumentRoot /var/www/test2
</VirtualHost>

I have phpmyadmin installed in /var/www/phpmyadmin, but how do I get to it!?! Do i need to register another domainname and point it to it? Do I need a subdomain in bind such as phpmyadmin.test1.co.uk? I can obviously move the 'phpmyadmin' folder into /var/www/test1 but I think there must be a better way! I dont want another domain name and i'm not sure I want to go subdomaining things if I can help it.

Sorry for long post, I just cant quite figure out if this is possible and how to do it. Any help is appreciated, I really need a bit of 'best practice' advice!
Cheers!

iaingblack 01-15-2007 04:16 PM

Solved!
 
Hi,

Sorry, I solved this after posting, amazing what writing things out can do for you, eh?

I changed apache.conf to do the following

#--------------------------------------------------------------------------------
NameVirtualHost myipaddress

<VirtualHost myipaddress>
ServerName www.test1.co.uk # Took away *.test1.co.uk
ServerAlias test1.co.uk www.test1.co.uk
DocumentRoot /var/www/test1
</VirtualHost>

<VirtualHost myipaddress>
ServerName www.test2.co.uk
ServerAlias test2.co.uk *.test2.co.uk
DocumentRoot /var/www/test2
</VirtualHost>

#Added in phpmyadmin.test1.co.uk
<VirtualHost myipaddress>
ServerName phpmyadmin.test2.co.uk
ServerAlias phpmyadmin.test2.co.uk
DocumentRoot /var/www/phpmyadmin
</VirtualHost>
#---------------------------------------------------------------------------------
Cheers!


All times are GMT -5. The time now is 02:32 PM.