View previous topic :: View next topic |
Author |
Message |
Dmtalon1 n00b
Joined: 18 Oct 2004 Posts: 14
|
Posted: Wed May 23, 2007 6:37 pm Post subject: Apache 1.3 + Apache 2 |
|
|
Can Apache1 and Apache2 exist in the same system?
I've been using apache1 until now, and since gentoo is no longer including it in portage it looks like I'm going to upgrade. Can I emerge apache2 and associated components, bring it up on a different port, and "test" it while apache 1 remains active?
Sorry if this has already been asked, I did not have any luck finding the answer.
Thanks, |
|
Back to top |
|
|
AllenJB Veteran
Joined: 02 Sep 2005 Posts: 1285
|
Posted: Wed May 23, 2007 9:05 pm Post subject: |
|
|
Yes, you can. This particular package has slotting enabled, which means you can install different major versions. To install apache2 while you have apache1 installed, simply run: emerge -a =apache-2*
It'll install all its config files into /etc/apache2 instead of /etc/apache, and it'll also have a separate init script and you can use apache2ctl instead of apachectl to control it. |
|
Back to top |
|
|
Dmtalon1 n00b
Joined: 18 Oct 2004 Posts: 14
|
Posted: Wed May 23, 2007 9:08 pm Post subject: |
|
|
Thanks for the reply... I actually just said the heck with it and tried
I've got both running ports 80 and 8080 for apache2 but now I'm stuck again. Since apache1 is no longer around, I can't recompile PHP to include both apache1 and apache2
Any chance that if I save off the libphp.so module and move it back in that I'll be able to get both 1 & 2 running or will that not work?
TIA |
|
Back to top |
|
|
AllenJB Veteran
Joined: 02 Sep 2005 Posts: 1285
|
Posted: Thu May 24, 2007 7:16 am Post subject: |
|
|
There are 2 possible methods I can suggest of getting PHP to work with both:
1) Go to http://sources.gentoo.org/ and select the "gentoo-x86" CVS repository (don't worry if you're not using x86, the name is an old legacy thing and the same repository is currently used for all architectures). Go to the package you require (in this case "dev-lang" then "php") and click "Show <n> dead files". You can now see all the old versions of the package.
Tip: You can often find the package version you want by looking at the commit messages (basically a change log) - the last commit message for each file is on the right-hand column.
Select the file you want from the list. In this case you want "php-4.4.6.ebuild" or "php-5.2.1-r3.ebuild". We can see that revision 1.11 for both these files was when apache1 was removed, so we want the last version before that, so click "download" next to revision 1.10. Place the file in your local overlay (if you don't know about overlays yet, browse the documentation at http://gentoo.org/doc - there's plenty of info available (you may also find some useful information on http://gentoo-wiki.com/ but do be aware that it's unofficial and frequently unmaintained and badly written).
Ta da. You now have PHP with apache 1 again.
One last note: Do be aware that you may be required to download other (old versions of) packages from the CVS repository in the same manner to fulfill dependencies.
2) Use CGI instead of apache modules. It can take a little more setting up, but using CGI instead of apache modules will allow you to run the current versions of PHP with apache 1. There's not much difference between either method. Using apache modules is generally considered to be faster and more secure and I think you may lose a bit of information passed in $_SERVER and some of the apache specific functions (by which I mean http://php.net/apache ), but that's it. |
|
Back to top |
|
|
Dmtalon1 n00b
Joined: 18 Oct 2004 Posts: 14
|
Posted: Thu May 24, 2007 12:40 pm Post subject: |
|
|
Thanks for the reply... Much like after my first post, I jumped in with both feet after everything else seemed to work and went ahead an emerged the latest PHP without support for apache1
I just kept apach1 running (no restarts) until I got everything working with apache2 and then shut it down, changed my ports in apache2 back to standard, and then brought it up. Things seem to be all in order, however somehow during all of this a "mailman" overlay was created. I don't know much about overlays, but know I didn't manually create this one.
My emerge -uNDpv world shows two mailman packages to install... I'll have to read up on how this happened |
|
Back to top |
|
|
arcterex Tux's lil' helper
Joined: 30 Sep 2002 Posts: 109
|
Posted: Wed May 30, 2007 5:23 am Post subject: |
|
|
Fingers crossed for you it works and there aren't any unexpected restarts for apache1 before you're ready to cut over I'm in the same situation as you are and am going to try the CVS thing. |
|
Back to top |
|
|
Dmtalon1 n00b
Joined: 18 Oct 2004 Posts: 14
|
Posted: Wed May 30, 2007 12:14 pm Post subject: |
|
|
arcterex wrote: | Fingers crossed for you it works and there aren't any unexpected restarts for apache1 before you're ready to cut over I'm in the same situation as you are and am going to try the CVS thing. |
Everything went pretty smooth... I'm up and running on apache2. I took the default httpd.conf file and modified it manually (vs. copying my apache1 over) and then copied my vhost.conf file over my ssl.conf over and a few other misc things.
It was, overall one of the smoother 'unplanned' upgrades I've done. |
|
Back to top |
|
|
|