From owner-freebsd-questions Tue Apr 2 9:24:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from futuristic.nl (futuristic.nl [213.84.217.160]) by hub.freebsd.org (Postfix) with ESMTP id A2B9737B419 for ; Tue, 2 Apr 2002 09:24:28 -0800 (PST) Received: from localhost (thomas@localhost) by futuristic.nl (8.11.6/8.11.6) with ESMTP id g32HOHi32894; Tue, 2 Apr 2002 19:24:18 +0200 (CEST) (envelope-from thomas@futuristic.nl) Date: Tue, 2 Apr 2002 19:24:17 +0200 (CEST) From: Thomas Bollen To: Wayne Lubin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: apache13-mod_ssl with mod_php4 and mysql In-Reply-To: <20020402075806.6862.qmail@web14708.mail.yahoo.com> Message-ID: <20020402184433.I32766-100000@futuristic.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Wayne, First of all i noticed that your probably a bit new to Apache, mySQL and PHP, a good start might be to learn more about these software packages, how they work, how the general installation goes and anything else you can find out. A good start might be: www.apache.org www.php.net www.mysql.com Second, it is possible to install everything you need with the FreeBSD ports collection. I'll show you how it's basically done. How (assuming the machine has an internet hookup): First let's install Apache-modSSL: Login, su to root and cd to: /usr/ports/www/apache13-modssl Here type 'make install clean', the port will now be fetched from a ftp server, then extracted, configured and installed, with probably some dependencies. Second let's install PHP: Assuming your still in /usr/ports/www/apache13-modssl do a cd to: /usr/ports/www/mod_php4 Here again type 'make install clean' (if you you want the php commandline interpreter, do not use 'clean', then you can copy it from the work directory lateron), the port will again be fetched from a ftp server, then extracted, configured and installed, with some dependencies. When installing PHP keep in mind a few things, first: during the installation you will be given a menu, make sure, you mark the option for mysql support! (yes! :-)) Second, after the installation process is done, make sure you see the following configuration in your /usr/local/etc/apache/httpd.conf: --snip-- LoadModule setenvif_module libexec/apache/mod_setenvif.so LoadModule php4_module libexec/apache/libphp4.so LoadModule ssl_module libexec/apache/libssl.so --snip-- --snip-- AddModule mod_setenvif.c AddModule mod_php4.c AddModule mod_ssl.c --snip-- --snip-- (something like the following) DirectoryIndex index.php index.php3 index.html DirectoryIndex index.php3 index.html DirectoryIndex index.php index.html DirectoryIndex index.html AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps --snip-- After this (and editing your httpd.conf a little further for apache itself) you can start your apache webserver, with php support and the modssl by typing as root: apachectl startssl Or if it's allready running: apachectl configtest apachectl graceful (yes one 'l'!) Or without modssl: apachectl start/configtest/graceful Ok now you got almost everything except the database.. (when looking closer you'll see you allready have the mysql-client port, installed as a dependencie, but not the mysql-server port). By the way, you can test your php by creating a php webpage with the phpinfo() function. Well assuming your still root, cd to: /usr/ports/databases/mysql323-server Here run 'make install clean' again, and the usual procedure will repeat itself. When it's done installing run 'safe_mysqld &' to start it up (if it hasn't allready) Offcourse there are allot of configuration options (and allot of security issues you might want to keep in mind, especially: PHP and mySQL) but this should get you on your way and help you through the process of installation, i might haven't told you every detail about the install, but it shouldn't be too hard to figure out any questions you might encounter, if you have anymore questions that you can't solve, even after reading documentation, don't hesitate to ask! More information about installing FreeBSD ports is on: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html Hope this helps and isn't too confusing ;-) i tried to keep it simple, Thomas On Mon, 1 Apr 2002, Wayne Lubin wrote: > Hi, > > I am not quite sure how to get apache13-mod_ssl with > mod_php4 and mysql all working together if installed > from the ports. If I was working from the source balls > then I would pass what I want as command line options > such as "with_php" or "with_mysql"(not exactly those > "words", but you know what I mean). My question is how > do I do this with the ports? For example, I looked at > the makefile in mod_php4 and it assumes that apache13 > is being used, and so it seems as if having > apache13-mod_ssl installed instead would just cause an > error(I am not saying this is what will happen, I am > just saying that I am a bit confused here). And how do > I get mod_php4 to talk to mysql? Seems as if you need > to pass to it the fact that you want it to talk to > mysql, such as by passing to it on the command line > when compiling, something like "with_mysql". But by > simply going into the mod_php4 port directory and > typing "make insall", I don't see how this gets that > info to it. > > In summary I would like to know how using the ports I > could get the three ports indicated above to all work > together. Thanks in advance. > > P.S. Someone told me that actually I could work > straight from the source balls and pass it all of the > above methioned "with_php" and with_mysql", and that > no "porting" of the code is required for the above > three softwares to work. Is this true? > > Wayne > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://http://taxes.yahoo.com/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message