0

I have an apache server configured with multiple NameVirtualHosts running on the same IP. This all works fine.

However, because of the "include conf.d/*" directive, apache also picks up config for cacti and phpmyadmin, which add in aliases for /cacti and /phpmyadmin, and those aliases appear to be valid for all virtualhosts. That is to say, I can go to http://firstvirtualhost/cacti and also http://secondvirtualhost/cacti, and I get the same page.

In my case, the default namevirtualhost is publicly visible, and I do not want tools like phpmyadmin or cacti to be visible under that URL

In fact, I don't want any random package to be able to make itself visible across all virtualhosts simply by creating a file for itself in conf.d.

smeenz
  • 3
  • 2

1 Answers1

0

You have to delete the line include conf.d from the global Apache configuration file, and optionally add it to your own private virtual host configuration file.

wldsvc
  • 1,242
  • 9
  • 13
  • Fair enough.. I was hoping there was a way to do it the 'ubuntu/debian' way so that package management doesn't go and break it later on when I upgrade – smeenz Mar 16 '13 at 00:12
  • Sorry, no debian friendly way that I could find. Upgrades are seamless enough though for such a small change. They need to implement something like sites-enabled/available for conf.d as well. Want to contribute ? ;) – wldsvc Mar 16 '13 at 00:16
  • It's a bit of a mess at the moment, since the phpmyadmin and cacti packages install "sites" using conf.d, which according to the debian apache.conf should contain "generic snippits of statements", and sites should go under sites-available – smeenz Mar 16 '13 at 01:38
  • Package Management won't go and break things when you do this. The apache.conf change should be preserved (or you get notified you need to merge it). The sites you configured won't be touched and files in conf.d will be upgraded as expected. – AVee Jan 29 '14 at 09:42