|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Valentin A. Alekseev 2:5030/1198.2 05 Apr 2002 01:36:24 To : Andrey Ivanov Subject : Re: php module for apache? -------------------------------------------------------------------------------- 04 апр 02 14:33, you wrote to all: AI> From: Andrey Ivanov <aivanov@damen-okean.com> AI> Доброго времени суток! AI> Как всем нам известно, поддержку php в апач можно осуществить двумя AI> способами: повесить модуль к апачу или вкомпиллировать в апач. AI> Последнее осуществляется с легкостью, а вот навесить модуль php к апачу AI> не удается: [...skip....] Было дело писал я одному заокеанскому другу такое описалово. Описано как ставить все в комплексе (Апач, SSL, mod_perl и PHP как модуль): === Begin file web-install-log === Used ---------------------- Apache 1.3.20 (http://httpd.apache.org/dist/) OpenSSL 0.9.6b (http://www.openssl.org/) mod_ssl 2.8.4-1.3.20 (http://www.modssl.org/) mod_perl-1.26 (http://perl.apache.org/) PHP4.0.6 (http://www.php.net/) Installation ---------------------- All software need to be unpacked in one source tree. e.g.: /root/install/web/ so ls output will look like: # ls apache_1.3.20/ mod_perl-1.26/ mod_ssl-2.8.4-1.3.20/ openssl-0.9.6b/ php-4.0.6/ You'll need all your packages unpacked before continue with this instruction. Extract commands: gunzip [archive-name].tar.gz tar -xf [archive-name].tar It's assumed that target directory of apache installtion will be /usr/local/apache to change this update corresponding string in --prefix parameter 1. OpenSSL 0.9.6b To build OpenSSL you'll need: make Perl 5 ANSI C Compiler (gcc) Compatible UNIX building: $ cd openssl-0.9.6b/ $ ./config $ make $ make test $ su # make install 2. mod_ssl-2.8.4-1.3.20 $ cd mod_ssl-2.8.4-1.3.20/ $ ./configure --with-apache=../apache_1.3.20 --with-ssl=../openssl-0.9.6b \ --prefix=/usr/local 3. mod_perl-1.26 $ cd mod_perl-1.26/ $ perl Makefile.PL EVERYTHING=1 APACHE_SRC=../apache-1.3.20 USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1 $ make $ su # make install To enable mod_php4 you'll need configured (but not installed) apache. So: $ cd apache_1.3.20/ $ ./configure 4. php-4.0.6 To add MySQL support add --with-mysql key to ./configure $ cd php-4.0.6/ $ ./configure --with-apache=../apache_1.3.20 --enable-track-vars $ make $ su # make install 5. apache_1.3.20 $ cd apache_1.3.20/ $ ./configure --enable-module=ssl --activate-module=src/modules/php4/libphp4.a \ --activate-module=src/modules/perl/libperl.a --enable-module=perl $ make $ su Long step to create your own SSL certificates (you should do this or your ssl encryption wount run): For dummy self-signed cert: # make certificate TYPE=dummy For test self-signed cert: # make certificate TYPE=test For custom local CA signed certificate: # make certificate TYPE=custom To use existing certs: # make certificate TYPE=existing CRT=[/path/to/certificate.crt] 6. PHP4 Configuration Copy & edit php4 configuration for your needs: # cd php-4.0.6/ # cp php.ini-dist /usr/local/lib/php.ini Then edit /usr/local/apache/conf/httpd.conf. Add following line somewhere at the end of config: AddType application/x-httpd-php .php .php4 That's all. Now you can run apache and test the output: # /usr/local/apache/bin/apachectl startssl # telnet 127.0.0.1 80 <blah-blah-blah> HEAD / HTTP/1.0 Host: 127.0.0.1 <double enter> Watch "Server:" string. Then try to connect to SSL port using some browser (netscape,konqueror etc). If you can't connect to SSL port try the following: 1) rename your httpd.conf to httpd.conf.old 2) make install for apache again 3) do necessary changes to new httpd.conf Tested on FreeBSD 4.4-RC and mentioned components. Q: To V.Alekseev@mail.ru === End file web-install-log === Вся настройка делалась под .20 апач, но с легкостью необычайной переделывается под любой другой заменой соответствующих цифирей Valentin --- #rusunix: lb: SHeFF забаню за протерроризм ;| * Origin: perl -e "print 'FreeBSD - FreeDAEMON' or die"; (2:5030/1198.2) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/39483cac9e08.html, оценка из 5, голосов 10
|