• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Michele Neylon :: Pensieri

Michele Neylon :: Pensieri

Technology, Marketing, Domains, Thoughts

Apache 2 configuration

July 25, 2004 by Michele Neylon 14 Comments

This site is now running on Apache 2 on Debian. The last time I used apache 2 it was an early release and the configuration structure and methods was almost identical to the 1.* series.
The current version uses similar directives, so implementing vhosts (virtual hosts) has not changed that dramatically, however the actual method for configuring them has.
Under the Apache 1.3.29, for example, all directives were contained in httpd.conf, whereas with apache 2 that file is completely blank. I found that a little bit confusing at first 🙂
So how do you actually do it?



It’s not that hard 🙂
The configuration directory (on my system /etc/apache2/conf ) contains a number of files and directories.
In apache2.conf , which in debian is in /etc/apache2, there is an include directive:
Include /etc/apache2/sites-enabled/[^.#]*
If you look in the same directory you will see that there are two sub-directories:
sites-available
sites-enabled

The idea is very simple. You create a small configuration file for every site you wish to host and place them in sites-available. To make the site active you simply symlink it in sites-enabled and restart apache (a graceful restart might be better, but it caused problems the last time I tried it)
If you want to disable a vhost simply remove the symlink and restart apache2.
This is an interesting way of doing things in my opinion, as you can easily “play with” configuration directives and activate/deactivate them very quickly.
The various apache modules are handled in exactly the same way:
/etc/apache2/mods-available – apache modules installed on the system
/etc/apache2/mods-enabled – apache modules in use
You no longer need to worry about fiddling with the load directives in the .conf, you simply symlink in a modules .load file eg. foo.load, to enable it and delete the symlink to disable it.
Apache: The Definitive Guide

Related Posts:

  • Video thumbnail for youtube video rxwyxuhm49u
    Eggs on Toast
  • Video thumbnail for youtube video fr7oyjnt3bm
    Luke Combs' Version of Fast Car
  • Video thumbnail for youtube video 564u39pjfui
    Thunderstruck Cover
  • rhubarb-strawberry-crumble
    Enjoying the Harvest From my Garden Already
  • computer-code-screens
    Dodgy WordPress Developer Tactics
  • 538203871_18523271710054922_7382288025725952365_n
    Making Apple and Fig Jam

Filed Under: Linux, Open Source, Techie :: Techno ::

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight. Read More…

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

dotblog founder

Mastodon

Archives

  • Bluesky
  • Instagram
  • Threads
  • Twitter

Pages

  • About Me
  • About This Site
  • Archives
  • Comments Policy
  • Contact Me
  • Newsletter
  • Privacy

Blogroll

  • Grandad
  • Gordon Hudson
  • Stewart Curry
  • Technology.ie Podcast
  • Damien Mulley

Stalking Links

Subscribe to Michele Neylon :: Pensieri

Blogroll

  • Blacknight Blog
  • Damien Mulley
  • Gianni Ponzi
  • Gordon Hudson
  • Grandad
  • My Mastodon
  • Paul Savage – BlackDog SEO
  • Stewart Curry
  • Technology.ie Podcast
  • Tom Doyle

Sites

  • Business Travel Tips
  • Discount Coupon Codes
  • Domain News
  • Fat.ie – my diet blog
  • Film Posters
  • Film Reviews
  • Films
  • Free Desktop Wallpapers
  • Irish Blogger Discussion Forum
  • Irish Stamps
  • Movie Trailers and News
  • Paste.ie

Footer

Site hosted in Ireland by Blacknight - Content copyright Michele Neylon

Copyright © 2026 · Magazine Pro on Genesis Framework · WordPress · Log in