You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bing Du <bd...@iastate.edu> on 2006/10/03 20:57:38 UTC

[users@httpd] how to comment out a large section in httpd.conf?

Hi,

The document http://httpd.apache.org/docs/2.0/configuring.html says:

==
Directives in the configuration files are case-insensitive, but arguments
to directives are often case sensitive. Lines that begin with the hash
character "#" are considered comments, and are ignored. Comments may not
be included on a line after a configuration directive. Blank lines and
white space occurring before a directive are ignored, so you may indent
directives for clarity.
==

Any way to do block comments, such as using /* and */ rather than add '#'
for each line?

Thanks in advance,

Bing

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to comment out a large section in httpd.conf?

Posted by Nick Kew <ni...@webthing.com>.
On Tuesday 03 October 2006 19:57, Bing Du wrote:
> Hi,
>
> The document http://httpd.apache.org/docs/2.0/configuring.html says:
>
> ==
> Directives in the configuration files are case-insensitive, but arguments
> to directives are often case sensitive. Lines that begin with the hash
> character "#" are considered comments, and are ignored. Comments may not
> be included on a line after a configuration directive. Blank lines and
> white space occurring before a directive are ignored, so you may indent
> directives for clarity.
> ==
>
> Any way to do block comments, such as using /* and */ rather than add '#'
> for each line?

Solution 1; google for mod_comment.

Solution 2:  Hack it with <IfDefine SomeUndefinedNonsense>

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.prenhallprofessional.com/title/0132409674

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to comment out a large section in httpd.conf?

Posted by Alexey Polyakov <al...@gmail.com>.
On 10/4/06, Octavian Rasnita <or...@gmail.com> wrote:

> If using something like the following example, does the syntax need to be
> correct inside the block?
>
> <IfModule qwzyqjz.c>
> ...
> </IfModule>

Yes and no - it's ok to have incorrect syntax, but if there's some
other </IfModule> directive without corresponding <IfModule...> inside
the block you're commenting out, it will terminate "comment".

-- 
Alexey Polyakov

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to comment out a large section in httpd.conf?

Posted by Octavian Rasnita <or...@gmail.com>.
If using something like the following example, does the syntax need to be
correct inside the block?

<IfModule qwzyqjz.c>
...
</IfModule>

Teddy

----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Tuesday, October 03, 2006 9:00 PM
Subject: Re: [users@httpd] how to comment out a large section in httpd.conf?


> On 10/3/06, Bing Du <bd...@iastate.edu> wrote:
> > Hi,
> >
> > The document http://httpd.apache.org/docs/2.0/configuring.html says:
> >
> > ==
> > Directives in the configuration files are case-insensitive, but
arguments
> > to directives are often case sensitive. Lines that begin with the hash
> > character "#" are considered comments, and are ignored. Comments may not
> > be included on a line after a configuration directive. Blank lines and
> > white space occurring before a directive are ignored, so you may indent
> > directives for clarity.
> > ==
> >
> > Any way to do block comments, such as using /* and */ rather than add
'#'
> > for each line?
>
> No.  You can use <IfDefine notdefined> ... </IfDefine>, but the stuff
> inside probably still needs to be syntactically correct, so use it
> with care.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to comment out a large section in httpd.conf?

Posted by Joshua Slive <jo...@slive.ca>.
On 10/3/06, Bing Du <bd...@iastate.edu> wrote:
> Hi,
>
> The document http://httpd.apache.org/docs/2.0/configuring.html says:
>
> ==
> Directives in the configuration files are case-insensitive, but arguments
> to directives are often case sensitive. Lines that begin with the hash
> character "#" are considered comments, and are ignored. Comments may not
> be included on a line after a configuration directive. Blank lines and
> white space occurring before a directive are ignored, so you may indent
> directives for clarity.
> ==
>
> Any way to do block comments, such as using /* and */ rather than add '#'
> for each line?

No.  You can use <IfDefine notdefined> ... </IfDefine>, but the stuff
inside probably still needs to be syntactically correct, so use it
with care.

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org