Reputation: 61
I've tried
vim /etc/phpmyadmin/apache.conf
but I can not put a VirtualHost here.
I want to change this configuration to list only the port 8080, can anyone help?
thank you
what I want is:
www.site.com/phpmyadmin -> failure
www.site.com:8080/phpmyadmin -> OK
I want to leave access to port 80 for the rest of the site.
Upvotes: 3
Views: 71809
Reputation: 30496
Usually the phpmayadmin configuration is included for all the Virtualhosts, that's a package installation behavior, and that's quite bad.
The file /etc/phpmyadmin/apache.conf
is included from the main configuration (sometimes from a file in /etc/apache2/conf.d/phpmyadmin.conf
).
Thoe first thing you could do is remove this main-all-virtualhosts-inclusion and only include this file with the Include
keyword in one Virtualhost.
This allows two things, first you could use a dedicated ServerName for this host. Second you can alter the Port of the Virtualhost (or you can just do one of theses things). Check this previous answer about IP/Name Virtualhosts, it will help you figure how Virtualhosts works. The Solution for you is to:
NameVirtualHost
, one on *:80
one on *:8080
ServerName: www.site.com
, ensure phpmyadmin configuration file is not includedServerName: www.site.com
Upvotes: 0
Reputation: 830
You can change the Listen directive to 8080.
Search the apache configuration for Listen and change it from
Listen 80
to
Listen 8080
And restart the server. Bear in mind, this will be global to the whole apache server though. On centos or redhat, it'll be called "httpd.conf"
Upvotes: 2