This document gives provides instructions for setting up a web server on an Elemental Linux Server (ELS) system using the Apache project's httpd.
You should have the following items available before proceeding with this document:
The steps below will guide you through the installation of Apache httpd using the ELS CD-ROM.
The following example shows how you might install Apache with your HTML documents stored in /home/httpd and your logs in /var/opt/httpd.
cd / tar -zxf /media/cdrom/extra/httpd-2.2.9.i586.tar.gz cd /opt/bin ln -s ../httpd-2.2.9/bin/* . mkdir /home/httpd cp /media/cdrom/doc/install.html /home/httpd/index.html mkdir /var/opt/httpd chown daemon /var/opt/httpd
Once installation is complete, you will need to edit the httpd.conf file to set up your web site.
The following example shows how to copy and edit the httpd.conf file, configure the firewall and set httpd for automatic start-up.
cp /opt/httpd-2.2.9/conf/httpd.conf /etc/opt/httpd vi /etc/opt/httpd/httpd.conf ServerAdmin webmaster@localnet.lan ServerName www.localnet.lan DocumentRoot /home/httpd <Directory "/home/httpd"> ErrorLog "/var/opt/httpd/error.log" CustomLog "/var/opt/httpd/access.log" common vi /etc/firewall # Allow web traffic from the local network. -A INPUT -p tcp -s 192.168.1.0/24 --dport 80 -j ACCEPT /etc/init.d/network restart chmod +x /etc/init.d/httpd
The instructions below will help you test you web server installation.
The following example shows a successful test using the lynx web browser.
login: root
password:
# /etc/init.d/httpd start
Web Server is starting.
lynx -dump http://127.0.0.1/
Elemental Linux Server Help
__________________________________________________________________
System requirements and limitations
The Elemental Linux Server (ELS) is a niche distribution and is not
intended to run on every imaginable hardware configuration.
Specifically, it is designed to run on standard x86 PC architecture
If you cannot view documents on your web server, try the following steps to help pinpoint the problem:
For more help installing and configuring Apache, see the Apache httpd documentation at: http://httpd.apache.org/docs/2.2/.