Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a FreeBSD (6.3-STABLE) production server with apache13 installed via ports. For various reasons I need to upgrade this to apache22, preferable also installed via ports. As my maintenance window is really short, I thought about installing the apache22 in parallel to apache13, configuring and testing it (on port :81 or so) and then just switch during maintenance. (Backups exist, of course).

Thing is, the apache22 port is setup to conflict with the apache13 and I can't find a way to override this.

[root@desearth ~]# portupgrade -fNW www/apache22
===>  Installing for apache-2.2.13

===>  apache-2.2.13 conflicts with installed package(s):

Also doing 'make install' in the /usr/ports/www/apache22 directory with -DFORCE_PKG_REGISTER fails for the same reason.

Any ideas how to work around this?

share|improve this question
Just to keep you updated, I just went ahead and did the upgrade during the maintenance window, doing a 'portupgrade -wNW www/apache22' before, so that everything was readily built and then issuing the 'portupgrade -ow www/apache22 www/apache13' after switching off the old one. This went pretty well and editing the configs was surprisingly quick. – jhwist Nov 5 '09 at 8:25
up vote 2 down vote accepted

I am stupid. I was always more concerned about the configuration files in /usr/local/etc/apache*, but never thought about the binaries (i.e. httpd and apachectl). Those of course will end up in the same place, which is what the CONFLICT in the ports' Makefile is for.

One solution offered to me outside serverfault was to use a jail, test the apache22 configuration there and then make the switch on the live system. This seems to be the way to go.

share|improve this answer
Yeah, I was opening this thread to say something about chroot or jail, but you've got it first =) – SaveTheRbtz Nov 3 '09 at 22:55

You can also specify PREFIX to install apache in different directory eg /usr/local/apache22 like:

make PREFIX=/usr/local/apache2
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.