Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 add article

HOWTO: Install Apache
Apache Posted by Jason on Saturday October 20, @12:26PM
from the world-wide-web dept.
This post covers the basics of installing the Apache web server for personal use. It is not an in depth article, but it will help a newbie get started with the Apache web server running on FreeBSD.

In case you have been living in cave banging rocks together for the last few years, Apache is a web server. A very fast and powerful OpenSource web server which is used by some of the largest websites worldwide. If you go to the Netcraft website and check uptimes, you will notice two things: BSD runs longer than most other OS's before requiring a reboot, and the web server those boxes are running is Apache. You will also find that Apache is run on over 50% of the websites worldwide.

Okay! Enough soap box evangelizing of Apache. Let's get on with installing it.

There are just few basic steps to configuring Apache.

[1 - download and install Apache]
[2 - start and test the server]
[3 - create content and restart Apache]

Here are the steps to setup apache. This is what most people will want to do in order to setup a personal web server.

[1 - download and install Apache]

You must be logged in as root in order to install programs from the ports collection.

cd /usr/ports/apache13
make install && clean

[2 - start and test the server]

Here is how to start and test the apache web server. Once you have determined that apache is up and running, you can replace the default content with your own web pages.

/usr/local/etc/rc.d/ start

Note: Apache will automatically start each time the system is rebooted.

You should now be able to connect to your apache web server with your browser on the local computer or a remote computer on the same network. If you have netscape, lynx or some other browser on the machine apache is installed on, you can test it with one of these urls.

http://{your ip address}

From a remote machine you could use:
http://{your apache hosts ip address}

Once you have used your web browser to test that the server is up and running, you should see apache's Congratulations splash screen displayed.
[3 - create content and restart Apache]

Once you've authored some html web content, you should place it in the /usr/local/www/data/ directory, restart apache and test it with your browser.

cp /usr/home/jason/index.html /usr/local/www/data/
killall -hup httpd

You can also start and stop apache with the start and stop command from the rc.d script:

/usr/local/etc/rc.d/ stop
/usr/local/etc/rc.d/ start

For in depth information on Apache I recommend Apache the definitive guide by O'Reilly Publishing. You can also check the man pages.

man httpd
man apachectl
man kill
man killall

<  |  >


Related Links
  • Articles on Apache
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: HOWTO: Install Apache
    by Sathish Kumar.R on Wednesday July 23, @09:00AM
    Easy steps to install apache,Mysql, php on windows xp. I found this tutorial in a blog to install on windows xp with mssql support
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]