RE: [users@httpd] Problems with installing a precompiled tarball to separate directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1. I would build and install httpd in the same root on all servers. If you install httpd under any other directory prefix, you will need to adjust the library path somehow, e.g. using LD_LIBRARY_PATH.

2. The web server configuration does not necessarily need to be below the httpd install root. You can very well install httpd under /usr/local/apache2 and have your Server Root in /var/www. You just need to make sure that apachectl starts httpd with the correct path to the configuration file, or not use apachectl to start the server but somehow write out the httpd command with correct arguments.

3. You can make a script that takes a template and a set of configuration properties as input, replaces symbolic properties in the template with values from the property file and thereby outputs a fully functional httpd.conf. There are very few configuration directives in httpd.conf that actually do require an absolute path, but there are a lot of addresses and other stuff that may change from one server to another. Such a strategy makes it easy to move your configuration around to different servers, change IP addresses, ports etc.

As an example, this is what one of my configuration files looks like:


### Section 1: Global Environment

ServerRoot "%%SERVER_ROOT%%"
ServerName %%SERVER_NAME%%:%%HTTP_PORT%%
PidFile %%SERVER_ROOT%%/logs/httpd.pid

AcceptMutex pthread
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

User apache
Group apache

ServerAdmin %%ADMIN_MAIL%%
ErrorLog %%SERVER_LOGS%%/error_log
ScriptAlias /cgi-bin/ "%%SERVER_ROOT%%/cgi-bin/"

LoadModule info_module         %%APACHE_ROOT%%/modules/mod_info.so
LoadModule cache_module         %%APACHE_ROOT%%/modules/mod_cache.so
LoadModule disk_cache_module    %%APACHE_ROOT%%/modules/mod_disk_cache.so
LoadModule expires_module       %%APACHE_ROOT%%/modules/mod_expires.so
LoadModule filter_module 	%%APACHE_ROOT%%/modules/mod_filter.so
LoadModule deflate_module       %%APACHE_ROOT%%/modules/mod_deflate.so

And this is an (partial) example of my property file:

#%%SERVER_ROOT%% = /u01/apache06
#%%SERVER_LOGS%% = /u01/apache06/logs
#%%APACHE_ROOT%% = /u01/opt/apache2
#%%MIME_TYPES%%  = /u01/opt/apache2/conf/mime.types
#%%SERVER_NAME%% = labelle16.dot.com.


-----Original Message-----
From: Per Weisteen [mailto:per.weisteen@xxxxxxxxx] 
Sent: Monday, November 21, 2005 10:58 AM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Problems with installing a precompiled tarball to separate directories

Hi

I need to be able to install Apache 1.3.34 to different directories on different servers (same OS and HW though) without having to build a separate version using different --PREFIX each time. I have tried to build with --PREFIX="" , then creating a tarball that is moved over to the target server and finally running make install -root=<target 
directory>. This mechanism is documented in the INSTALL file for 1.3.34
but still doesn't seem to work. All files are copied to correct <target 
directory> but apachectl and httpd.conf doesn't contain correct paths. 
Any info would be most welcome.
--
------------------------------------------------------------------------
Per Weisteen
	
	
	
Hydro IS Partner <http://www.hydroispartner.com/>
	
	IS/IT Architect
	
Norsk Hydro ASA <http://www.hydro.com/>
	
	Email: per.weisteen@xxxxxxxxx <mailto:per.weisteen@xxxxxxxxx>
	Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=0&t=67>
NO-0240 Oslo, Norway
	
	Phone:(+47) 2253 8227/Mobile:(+47) 9344 5312
	




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux