Test httpd.conf setup - using variables in httpd.conf

Test httpd.conf setup - using variables in httpd.conf

Post by Bill Mosele » Wed, 16 Feb 2000 04:00:00



I'm often testing Apache httpd.conf setups using a parallel
DocumentRoots.  I'd like to be able to use variables in httpd.conf file,
such that:

   $dir = 'test_dir';

   DocumentRoot /usr/local/web/$dir
   <Directory /urs/local/web/$dir/some_dir>

And when ready to use on live data just change:

   $dir = 'live_data';

or some such thing.

Any tricks for doing this?

--

pls note the one line sig, not counting this one.

 
 
 

Test httpd.conf setup - using variables in httpd.conf

Post by John Imri » Thu, 17 Feb 2000 04:00:00



> I'm often testing Apache httpd.conf setups using a parallel
> DocumentRoots.  I'd like to be able to use variables in httpd.conf file,
> such that:

>    $dir = 'test_dir';

>    DocumentRoot /usr/local/web/$dir
>    <Directory /urs/local/web/$dir/some_dir>

> And when ready to use on live data just change:

>    $dir = 'live_data';

I think you can do this with mod_perl.

John Imrie

 
 
 

Test httpd.conf setup - using variables in httpd.conf

Post by Sven Huste » Thu, 17 Feb 2000 04:00:00



> I'm often testing Apache httpd.conf setups using a parallel
> DocumentRoots.  I'd like to be able to use variables in httpd.conf file,
> such that:
>    $dir = 'test_dir';
>    DocumentRoot /usr/local/web/$dir
>    <Directory /urs/local/web/$dir/some_dir>
> And when ready to use on live data just change:
>    $dir = 'live_data';
> or some such thing.
> Any tricks for doing this?

i use m4 to do such things.

like

---------------------------
define(`DIR',`/test/foo')

DocumentRoot DIR
---------------------------

after that use m4 to process this to the httpd.conf file.

use make if you like.

cu
sven

> --

> pls note the one line sig, not counting this one.

 
 
 

Test httpd.conf setup - using variables in httpd.conf

Post by Fullnew » Tue, 22 Feb 2000 04:00:00


If you are just doing a test/release thing.

Without using variables you can set up
a VirtualHost called "test.yourdomain.net"
and use a separate DocumentRoot there.

Then when you want to test you would point
your browser at:
http://test.yourdomain.net/

Then when your done just point the "DcumentRoot"
of the main server at the DocumentRoot of the
Test Virtualhost.

-- Michael --


> I'm often testing Apache httpd.conf setups using a parallel
> DocumentRoots.  I'd like to be able to use variables in httpd.conf file,
> such that:

>    $dir = 'test_dir';

>    DocumentRoot /usr/local/web/$dir
>    <Directory /urs/local/web/$dir/some_dir>

> And when ready to use on live data just change:

>    $dir = 'live_data';

> or some such thing.

> Any tricks for doing this?

> --

> pls note the one line sig, not counting this one.

 
 
 

1. Can I define srm.conf, access.conf in httpd.conf ?

I defined ErrorDocument 403 /sorry.htm
in srm.conf, because I found this instruction in this file in a commented
line with examples.

I Found I can define ErrorDocument in httpd.conf file instead of srm.conf
I didn't know this.

What I don't know is, If I can define all my src.conf and access.conf inside
httpd.conf
or only some instructions.

Thanks

--

Gerardo Blanco

2. need a usenet newsreader

3. redhat-config-httpd doesn't write to httpd.conf

4. Printers for Linux ???

5. how to determine httpd.conf and httpd daemon for my webserver?

6. HAve you tried posting to new newsgroup?

7. cern-httpd - proxy-cache - httpd.conf WANTED ???!!!

8. Very low LAN speed

9. translator from CERN httpd configuration rules to Apache httpd conf?

10. HTTPd 1.5 dumps core when httpd.conf has "Group #-1"

11. ScriptAlias in httpd.conf versus srm.conf

12. APACHE 1.1.1 httpd.conf and the "httpd -f ..." option

13. including other conf files in httpd.conf