Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Web Server


Installing a web server under Debian is as simple as installing apache2:



  # wajig install apache2

You will now have a default web page at https://localhost/. The actual page being displayed there comes from /var/www/index.html. You can begin creating your own web site from there.

For a secure web server, using SSL to encrypt all communications from a browser to the server (recognised with the https: prefix) you will need to enable the ssl module in apache2 and configure it:

wajig install apache2 openssl
/usr/sbin/apache2-ssl-certificate
a2enmod ssl
cd /etc/apache2/sites-available
cp default ssl

Edit the new ssl:

NameVirtualHost *:443
<VirtualHost *:443>
	SSLEngine On
	SSLCertificateFile /etc/apache2/ssl/apache.pem
	ServerName host.name.specified.in.certificate.creation

Edit default to add *:80.

a2ensite ssl

Make sure /etc/apache2/ports.conf contains:

Listen 443
Listen 80

Then

wajig restart apache2

For apache1 there were two approaches available: One is to use apache with the libapache-mod-ssl module and the other is to install the apache-ssl which installs a separate apache server to listen to port 443 (instead of 80). There are advantages either way but using apache-ssl is straightforward and cleanly keeps the two servers separate (configuration files are in /etc/apache and /etc/apache-ssl and log files in /var/log/apache and /var/log/apache-ssl respectively).


Subsections

Copyright © 1995-2006 [email protected]

 
 
  Published under the terms fo the GNU General Public License Design by Interspire