InstallingAboutUsOnLinux/InstallApache

Back to InstallingAboutUsOnLinux

cd /www/source
wget http://www.apache.org/dist/httpd/httpd-2.2.9.tar.gz
tar jxvf httpd-2.2.9.tar.gz
cd httpd-2.2.9.tar.gz/
./configure --prefix=/www \
  --enable-modules=most \
  --enable-mods-shared=all \
  --enable-info \
  --enable-rewrite \
  --enable-so \
  --with-program-name=apache2 \
  --enable-ssl \
  --enable-header \
  --enable-proxy \
  --enable-proxy-http
make
make install

echo "NameVirtualHost *:80
NameVirtualHost *:443
Include conf/branches
Include conf/ssl.conf" >> /www/conf/apache2.conf

mkdir /www/conf/branches
mkdir -p /www/tmp/sessions
chmod -R 777 /www/tmp/sessions
mkdir /www/certs
cd /www/certs
setup_ssl localhost
# It seems the setup_ssl file is now linux_ssl

Installing on CentOS

Also, on CentOS the path to CA.pl is different.

To find it, or what package to install to get it run:

yum provides CA.pl

In my case, I had to install openssl-perl and change the lines of linux_ssl that pointed to /usr/lib/ssl to point to /etc/pki/tls/ instead



SSL.conf

Initialize your /www/conf/ssl.conf with the following contents

Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin

SSLSessionCache         shmcb:/www/tmp/sessions/scache(512000)
SSLSessionCacheTimeout  300

SSLMutex default

SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin

SSLCryptoDevice builtin

<VirtualHost *:443>
ServerName localhost

ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

SSLEngine on
SSLProtocol all -SSLv2

SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

SSLCertificateFile /www/certs/newcert.pem
SSLCertificateKeyFile /www/certs/webserver.key

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

Restart Apache

sudo /www/bin/apachectl start


Retrieved from "http://aboutus.com/index.php?title=InstallingAboutUsOnLinux/InstallApache&oldid=17093165"