# Installing Apache2 + SSL  + PHP5



## ph0enix (Mar 9, 2009)

Is there a preferred way to install Apache2 with SSL and PHP in FreeBSD?  I see that there is a way install Apache 1.3 with SSL by doing "pkg_add -r apache+ssl".  Is there a binary like that for Apache2 with SSL and PHP?

Thanks!


----------



## anomie (Mar 9, 2009)

There is a bsdguides.org walkthrough you might like to review on this topic:

http://www.bsdguides.org/guides/freebsd/webserver/apache_ssl_php_mysql.php


----------



## ph0enix (Mar 10, 2009)

That got me on the right track.

Thank you!


----------



## ph0enix (Mar 10, 2009)

I'm having one issue though.  I have the following in my rc.conf but apache isn't starting automatically when the systems boots:

apache2_enable="YES"
apache2_flags="-DSSL"

I have to do "apachectl start" every time.  I'm running:
Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.8e DAV/2 PHP/5.2.8 with Suhosin-Patch

Thanks!


----------



## DutchDaemon (Mar 10, 2009)

You need apache*22*, not apache*2*.


----------



## ph0enix (Mar 10, 2009)

DutchDaemon said:
			
		

> You need apache*22*, not apache*2*.



Thanks!  I realized that after posting.  I made the change but I have KDE compiling now so I'll reboot when it's done and report back.

J.


----------



## SirDice (Mar 10, 2009)

ph0enix said:
			
		

> Thanks!  I realized that after posting.  I made the change but I have KDE compiling now so I'll reboot when it's done and report back.



Just /usr/local/etc/rc.d/apache22 start


----------



## ph0enix (Mar 10, 2009)

That works:
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.

Thanks!


----------

