Your Daily Source for Apache News and Information |
Breaking News | Preferences | Contribute | Triggers | Link Us | Search | About |
|
By Most of your server configuration is done in the server configuration files, after you have installed Apache. However, the things that you are able to configure are largely decided when you install the server. That is, if you don't install a particular module, then you cannot configure the things that that module control. In the configuration stage, before you compile your Apache server, you decide what modules you want installed, where you want files to get put, and a variety of other things. You can also specify various things that get set in the server configuration files, which you can then change afterwards. In this week's column, we'll talk about some of the things that you can do with the A Basic InstallationFor a basic Apache installation, using all the default settings, simply follow the instructions that you see near the top of the tar -zxf apache_1.3.12.tar.gz cd apache_1.3.12 ./configure --prefix=PREFIX make make install And of course, even that does not accept all the defaults, because we are specifying where we want the files to be put. Configure OptionsIf you simply run Configuring for Apache, Version 1.3.12 + Warning: Configuring Apache with default settings. + This is probably not what you really want. + Please read the README.configure and INSTALL files + first or at least run './configure --help' for + a compact summary of available options. When we type --show-layout --sysconfdir=DIR ./configure --sysconfigdir=/etc/httpd --htdocsdir=DIR Other File LocationsThere are also a number of directives like the last few, which let you set the location of files. My personal preference is to install all of Apache in one location ( cd /var/log ln -s /usr/local/apache/logs httpd This is also handy for your log rotate scripts, which expect log files to be in Module ConfigurationYou can tell Apache what modules to build and activate with configuration options. In a default configuration, some modules are enabled, and others are not. To change this default configuration, you can use the The default configuration is as follows: [access=yes actions=yes alias=yes ] [asis=yes auth=yes auth_anon=no ] [auth_db=no auth_dbm=no auth_digest=no ] [autoindex=yes cern_meta=no cgi=yes ] [digest=no dir=yes env=yes ] [example=no expires=no headers=no ] [imap=yes include=yes info=no ] [log_agent=no log_config=yes log_referer=no ] [mime=yes mime_magic=no mmap_static=no ] [negotiation=yes proxy=no rewrite=no ] [setenvif=yes so=no speling=no ] [status=yes unique_id=no userdir=yes ] [usertrack=no vhost_alias=no ] For example: ./configure --prefix=/home/httpd --enable-module=speling \ --disable-module=userdir If you wish to build a particular module as a shared object you can use the ./configure --prefix=/usr/local/apache \ --enable-module=rewrite \ --enable-shared=rewrite To compile and enable a module that is not part of the standard Apache distribution, you can use the ./configure --prefix=/usr/local/apache \ --add-module=/home/rbowen/mods/mod_mine.c Manually Tweaking Your ConfigurationAs I mentioned in my last column, there are two ways to configure your Apache build. There's the method describe above, and then there's the "old-fashioned" manual process. In the If you open up ./Configure -file Configuration.apaci This is particularly useful if you want to experiment with different build configurations. Or, as in my case, if you need to support several different customers, and want to mirror their Apache installation as closely as possible. You can simply save several different versions of your The format of the For More InformationThe complete resource on using And for more information about Rich Bowen is the Director of Web Application Development at The Creative Group and the author of Apache Server Unleashed. |
|
|
About Triggers | Media Kit | Security | Triggers | Login |
All times are recorded in UTC. Linux is a trademark of Linus Torvalds. Powered by Linux 2.4, Apache 1.3, and PHP 4 Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy. |