TurnKey Linux Virtual Appliance Library

TKL phpMyAdmin: change port and domain name

Hello to all,

I'm not very expert about Apache server configuration, but I'm pretty able to do almost every basic configuration on the web server. Anyhow, I can't find out how to do what I want to achieve.

I explain what I'd like to do:

- I don't want phpmyadmin to accessible only via SSL: I'd like PMA to be reachable also via http (maybe ONLY via Http, but that's not strictly necessary).

- I don't want PMA to be accessible via http://<server IP>:12322 . I'd like PMA to be accessible via a specific domain name such as http://pma.test.local (port 80, not 12322) (I have a DNS to route all requestes *.test.local to my server IP...).

- Also, if possible, I'd also like Webmin to be accessible via a specific domain name and a custom port (ie. 12321 as defaults).

I really can't reach this result! Can you kindly help me, please?
It's been about two days of googling and "turnkeying" without any results... I tried changing virtual servers, per-directory directives... Nothing.

 

Thank you very much.

Best regards.

Tobia Zanarella

Kevin's picture

Have you done this?

When you registerd your domain you mapped you wan IP to your domain name.

Did you create additional A records E.g test.domin.com   and insert wan Ip address to link them.

You can create as many vhost as you want but if you dont map them on the domain reg site, they will not be seen.


Yes I did

Hello,

Of course I did. The server is on a VMW virtual machine inside my computer. I changed the hosts file in order to have my domains to point to the IP of the server.

It works perfectly when I try to create a new Vhost such as www.test.com, or site1.site2.com.

But when I use a domain to point to the PMA folder, it just doesn't work!

Jeremy's picture

Firstly, are you sure you want phpMyAdmin on http?

I'm guessing by your posts so far that you know what you are doing. But for the record (and probably as much for anyone else who comes across this thread) I think it is a particularly bad idea. As you are probably aware, using http would allow anyone to relatively easily sniff out your MySQL password and take control of your data. Same applies to Webmin (over http).

Anyway, getting back to the point of your original request, a quick google suggests that you will probably need to adjust more than the virtual host to get it to work as desired. Have a look at the phpMyAdmin docs here. Hopefully that may head you in the right direction, otherwise if you keep in mind that TKL v11.x is based on Ubuntu 10.04 then you should find a fair bit of info about.

A final idea may be to 'apt-get remove --purge phpmyadmin' and then reinstall 'apt-get install phpmyadmin'. That should give you the default config (IIRC it will default to http(s?)://<server-fqdn-or-ip>/phpmyadmin).

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)