Installaction - Httpd
# Install apache
> groupadd apache
> useradd -g apache apache
> ./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-ssl --enable-so
> make && make install
> cd /usr/local/apache2/bin
> cp apachectl /etc/rc.d/init.d/httpd
> vi /etc/rc.d.init.d/httpd
# chkconfig: 2345 70 30
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
...
case $ARGV in
start|stop|restart|graceful)
$HTTPD -k $ARGV -DSSL
ERROR=$?
;;
> /sbin/chkconfig --add httpd
> chown -R root .
> chgrp -R apache .
> chown -R apache error logs
> vi conf/httpd.conf
<DocumentRoot "" ...
User apache
Group apache
...
# Customize the ssl
> cd /tmp
> mkdir ssl
> cd /tmp
> mkdir ssl
> openssl req -new -out ssl/server.csr
Enter PEM pass phrase: abc123
Verifying - Enter PEM pass phrase: abc123
Country Name (2 letter code) [GB]: ALL PRESS ENTER TO SKIP FROM HERE
> openssl rsa -in privkey.pem -out ssl/server.key
Enter pass phrase for privkey.pem: abc123
> openssl x509 -in ssl/server.csr -out ssl/server.crt -req -signkey ssl/server.key -days 365
> mkdir /usr/local/apache2/conf/ssl.crt
> mkdir /usr/local/apache2/conf/ssl.key
> cp ssl/server.crt /usr/local/apache2/conf/ssl.crt
> cp ssl/server.key /usr/local/apache2/conf/ssl.key
> rm -rf privkey.pem ssl







评论排行榜