×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Apache SSL / Linux

how install apache2 with php and ssl ? :) by lexart
Posted: 4 Jul 02 (Edited 24 Jul 03)

///////////////////////////////////////////////////////////////
////INSTALL APACHE2 + PHP + SSL +GLIB{JPEG,PNG) on RH7.3/////
///////////////////////////////////////////////////////////////

=================> zlib
./configure
make install

=================> libpng
copy makefile from dir libpng-1.2.3/scripts
make install

=================> jpegsrc.v6b.tar.gz (at end, gmake install-lib)
./configure
make
make install
make install-lib


=================> gd-1.8.4.tar.gz (see note at bottom on reasoning for numerous -I)
edit 'Makefile'
CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG
LIBS=-lgd -lpng -lz -ljpeg -lm
INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 \
-I/usr/X11R6/include/X11 -I/usr/local/include \
-I/usr/local/include/freetype2 -I/usr/X11R6/include \
-I/usr/local/include/freetype2/freetype
LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
make
make install


=================> openssl
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl
make
make install


./usr/local/ssl/bin/openssl genrsa -des3 -rand any_file1:any_file12:any_file13 \
-out www.yourdomain.cz.key 1024

./usr/local/ssl/bin/openssl req -new -key www.yourdomain.cz.key -out www.yourdomain.cz.csr


./usr/local/ssl/bin/openssl x509 -req -days 365 \
-in www.yourdomain.cz.csr -signkey www.yourdomain.cz.key \
-out www.yourdomain.cz.crt

=================> cd ../apache 2.x.x
if you have RedHat9
{
So anyways, this didn't solve the problem either. krb5 and openssl rpms are all installed fine and apache just won't behave. SO I rip open that krb5-devel rpm and check out whether it has krb5.h, and where. Lo and behold:

[root@nigel httpd-2.0.45]# rpm -ql krb5-devel | grep /krb5.h
/usr/kerberos/include/krb5.h
[root@nigel httpd-2.0.45]#

Yet nothing in the failing build command is referencing that non standard include directory! AHA! I reconfigure with CFLAGS="-I/usr/kerberos/include" and it finally compiled.

Here's my complete configure line:

CFLAGS="-I/usr/kerberos/include -DSECURITY_HOLE_PASS_AUTHORIZATION" ./configure --prefix=/usr/local/apache-2.0.45 --enable-mods-shared=all --enable-ssl
}
else
{
./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max --enable-ssl --enable-shared=ssl
}
make
make install



=================> PHP
./configure --enable-safe-mode \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql \
--enable-track-vars \
--enable-ftp \
--with-gd=/home/1/gd-1.8.4 \
--with-png-dir=/home/1/libpng-1.2.3 \
--with-zlib-dir=/home/1/zlib-1.1.4 \
--with-jpeg-dir=/home/1/jpeg-6b \
--enable-trans-sid \
--disable-debug

make
make install

=================> EDIT APACHE/CONF/Httpd.CONF
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.php3 index.phtml
</IfModule>

AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps

=================> EDIT APACHE/CONF/ssl.CONF
# Server Certificate:
SSLCertificateFile /usr/local/apache/conf/www.yourdomain.cz.crt
#SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt

# Server Private Key:
SSLCertificateKeyFile /usr/local/apache/conf/www.yourdomain.cz.key
#SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

copy www.yourdomain.cz.crt and www.yourdomain.cz.key into /usr/local/apache/conf/

go to /usr/local/apache/bin/apachectl startssl

Back to Linux (server) FAQ Index
Back to Linux (server) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close