[Fwd: Contrib to Network Administrator's Manual]
I am no longer involved with the Debian Documentation Project, so I am
forwarding this to the debian-doc list.
-------- Forwarded Message --------
> From: Erik <info@webmind.org>
> To: olly@lfix.co.uk
> Subject: Contrib to Network Administrator's Manual
> Date: Mon, 11 Feb 2008 00:15:57 +0000
>
> Hi,
>
> Purpose to set up a webserver on debian.
> this email has 2 little howto's
> Apache2 13.2.1
> Apache2 with ssl. 13.2.2
> Regards Erik Coorengel
> www.webmind.org
>
>
> -----
> 13.2.1
>
> ---------------------------------------------------
>
> Lightweight apache2 server.
>
> Install packages;
> server:# apt-get install apache2-mpm-prefork
>
> The system wil select the needed packages for you.
>
> #mkdir /var/www/domain
> This is the home directory. - index.html
>
> Tell apache about domain.xorg.
> server:# nano /etc/apache2/sites-available/default
>
> NameVirtualHost *
> <VirtualHost *>
> ServerName domain.xorg
> ServerAlias www.domain.xorg
> ServerAdmin webmaster@domain.xorg
>
> DocumentRoot /var/www/domain
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /var/www/domein/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> # This directive allows us to have apache2's default start page
> # in /apache2-default/, but still have / go to the right
> place
> # RedirectMatch ^/$ /apache2-default/
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
> ServerSignature On
>
> </VirtualHost>
>
> Restart apache2;
> #/etc/init.d/apache2 force-reload
>
> Add PHP5 to Apache2.
> #apt-get install libapache2-mod-php5
>
> Restart apache2;
> #/etc/init.d/apache2 force-reload
>
>
>
>
>
>
> -----------------------------------------------------------
> 13.2.2
>
> Apache2 SSL with selfsigned certificate.
>
> A selfsigned certificate gives protection to your data, but also a
> warning in the browser, because it's not in the trusted map.
>
> #apt-get install openssl
>
> [u]Generating a certificate.[/u]
>
> Create a key:
> #openssl genrsa -out key.pem 2048
>
> Create certificate request.
> Name = domein.xorg ..
> # req -new -key key.pem -out request.pem
>
> Create a self-signed certificate with a vality of one year.
> #openssl req -x509 -days 365 -key key.pem -in request.pem -out
> certificate.pem
>
> Combine the key and certificate:
> #cat key.pem certificate.pem >apache.pem
>
> Copy the file to the directory specified in default-ssl.
> #cp apache.pem /etc/apache2/apache.pem
>
> [u]Activate ssl[/u]
> #a2enmod ssl
> #nano /etc/apache2/ports.conf
> apply;
> [blockquote]Listen 443[/blockquote]
>
> Apply NameVirtualHost ssl
>
> #nano /etc/apache2/sites-available/default
> add;
> [blockquote]Include /etc/apache2/sites-available/default-ssl[/blockquote]
>
> #touch /etc/apache2/sites-available/default-ssl
> #nano /etc/apache2/sites-available/default-ssl
>
> [blockquote]NameVirtualHost *:443
> <VirtualHost *:443>
> ServerName www.domein.xorg
> ServerAlias domein.xorg
> ServerAdmin webmaster@domein.xorg
>
> DocumentRoot /var/www/domein
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
> ServerSignature On
> SSLEngine On
> SSLCertificateFile /etc/apache2/apache.pem
> </VirtualHost>[/blockquote]
>
> #/etc/init.d/apache2 force-reload
>
>
>
--
Oliver Elphick olly@lfix.co.uk
Paule, Brittany, France http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
You're nearly out of time! http://www.lfix.co.uk/disappearance.html
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Reply to: