[us...@httpd] httpd to get process list

2010-05-27 Thread James Corteciano
Hi All,

I have a nagios server to monitor the remote apache server and automatically
restarting the service if it is detected unreachable. Now, in times of
apache down, I just want to get the processes list or any means that could
help during diagnostic operation. Can anyone recommend any good apps or
maybe script for this type of scenario?

Thank you.

Regards,
James


Re: [us...@httpd] httpd to get process list

2010-05-27 Thread J. Bakshi
On 05/27/2010 12:42 PM, James Corteciano wrote:
> Hi All,
>
> I have a nagios server to monitor the remote apache server and
> automatically restarting the service if it is detected unreachable.
> Now, in times of apache down, I just want to get the processes list or
> any means that could help during diagnostic operation. Can anyone
> recommend any good apps or maybe script for this type of scenario?
>
> Thank you.
>
> Regards,
> James
>
>

This is not a direct solution of your issue but I may be permitted to
say that monit is more reliable in this scenario than nagios. I use
both; nagios to monitor and monit to take action. Some times due to net
problem nagios also send non reachable signal but monit runs on the same
server and do its job perfectly well.

You can include a script in the start section of your
/etc/init.d/apache2 script which will email you the present process list
just before starting apache. Hence when monit restarts apache, you will
also get that email.

Thanks



-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] Apache MPM

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 11:56 AM, Nasir Zia  wrote:
> Hi,
>
> how can i decide to use prefork or worker MPM. Can anyone describe in detail
> and how can i make a server which can handle 2000 users per second. How can
> I optimize the server response. i am using Apache 2.2.15.
>
> Regards
> Nasir
>


The MPM that is to be used is decided at compile time. You will have
to recompile apache to change MPM. Worker usually performs better for
large amount of requests but is threaded- so you need thread safe
applications and libraries which work with apache.

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 12:25 PM, J. Bakshi  wrote:
> On 05/27/2010 12:16 PM, J. Bakshi wrote:
>> Hello list,
>>
>> I am trying to achieve a very particular .htaccess redirect arrangement.
>> I have made it worked but halfway :-(
>>
>> I have written a redirect rule as
>>
>> `
>> RewriteCond %{HTTP_HOST} ^testyou.mydomain.com
>> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
>> [R=301,L]
>>
>> `
>>
>> So http://testyou.mydomain.com should redirect to
>> http://www.mydomain.com\?domain=testyou.mydomain.com
>>
>> But with the above rule the link redirects to
>>
>> http://www.mydomain.com\?=testyou.mydomain.com
>>
>> So without the *domain* in between.
>>
>> Could any one suggest to
>>
>> [1] how can I fixed this so the *domain* appears like
>> http://www.mydomain.com\?domain=testyou.mydomain.com
>>
>> [2] Can there be any arrangement so that I can use bulk redirection ?
>> Say putting a variable in place of testyou.mydomain.com , so that those
>> two rules can effectively redirect all subdomains pointed to that server
>> ? I don't know if it really possible. Any sugestion/clue please ?
>>
>> Thanks
>>
>>
>
> [1] is fixed  by
>
> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
> [R=301,L]
>
> [2] Is there any way to modify the rule for bulk domain or should I
> write the rule set for each individual domain ?
>
> Thanks for our time
>
>
> --
> জয়দীপ বক্সী
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


How you got [1] fixed, there's no change in the rule !

For bulk redirection within subdomains I suggest this:

RewrtieCond %{HTTP_HOST} (.+).mydomain.com$
RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST} [R=301]

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] httpd to get process list

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 12:42 PM, James Corteciano
 wrote:
> Hi All,
> I have a nagios server to monitor the remote apache server and automatically
> restarting the service if it is detected unreachable. Now, in times of
> apache down, I just want to get the processes list or any means that could
> help during diagnostic operation. Can anyone recommend any good apps or
> maybe script for this type of scenario?
> Thank you.
> Regards,
> James
>
>


You could use a script which runs every minute or so to check if
apache is dead and dump the processlist at that instant into a file.
Though it may have a lot of performance overhead. You've been warned.
The script:

#!/bin/bash

ps -C httpd &> /dev/null
if [ $? -ne 0 ]; then
  ps -A > /processlit
fi

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread J. Bakshi
On 05/27/2010 01:14 PM, Nilesh Govindarajan wrote:
> On Thu, May 27, 2010 at 12:25 PM, J. Bakshi  wrote:
>   
>> On 05/27/2010 12:16 PM, J. Bakshi wrote:
>> 
>>> Hello list,
>>>
>>> I am trying to achieve a very particular .htaccess redirect arrangement.
>>> I have made it worked but halfway :-(
>>>
>>> I have written a redirect rule as
>>>
>>> `
>>> RewriteCond %{HTTP_HOST} ^testyou.mydomain.com
>>> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
>>> [R=301,L]
>>>
>>> `
>>>
>>> So http://testyou.mydomain.com should redirect to
>>> http://www.mydomain.com\?domain=testyou.mydomain.com
>>>
>>> But with the above rule the link redirects to
>>>
>>> http://www.mydomain.com\?=testyou.mydomain.com
>>>
>>> So without the *domain* in between.
>>>
>>> Could any one suggest to
>>>
>>> [1] how can I fixed this so the *domain* appears like
>>> http://www.mydomain.com\?domain=testyou.mydomain.com
>>>
>>> [2] Can there be any arrangement so that I can use bulk redirection ?
>>> Say putting a variable in place of testyou.mydomain.com , so that those
>>> two rules can effectively redirect all subdomains pointed to that server
>>> ? I don't know if it really possible. Any sugestion/clue please ?
>>>
>>> Thanks
>>>
>>>
>>>   
>> [1] is fixed  by
>>
>> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
>> [R=301,L]
>>
>> [2] Is there any way to modify the rule for bulk domain or should I
>> write the rule set for each individual domain ?
>>
>> Thanks for our time
>>
>>
>> --
>> জয়দীপ বক্সী
>>
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>> 
>
> How you got [1] fixed, there's no change in the rule !
>
> For bulk redirection within subdomains I suggest this:
>
> RewrtieCond %{HTTP_HOST} (.+).mydomain.com$
> RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST} [R=301]
>
>   


Hello Nilesh,

Thank for your response.  But the rule produce an internal server error
( code 500 ). 

Presently what I am using for each individual domain are

```
RewriteCond %{HTTP_HOST} ^domain1.Adomain.com
RewriteRule ^(.*)$ http://www.mytestsite.com\?domain=domain1.Adomain.com
[R=301,L]

RewriteCond %{HTTP_HOST} ^domain1.Bdomain.com
RewriteRule ^(.*)$ http://www.mytestsite.com\?domain=domain1.Bdomain.com
[R=301,L]



All the dub-domains ( domain1.Adomain.com etc...) are pointed to the server.

-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 1:45 PM, J. Bakshi  wrote:
> On 05/27/2010 01:14 PM, Nilesh Govindarajan wrote:
>> On Thu, May 27, 2010 at 12:25 PM, J. Bakshi  wrote:
>>
>>> On 05/27/2010 12:16 PM, J. Bakshi wrote:
>>>
 Hello list,

 I am trying to achieve a very particular .htaccess redirect arrangement.
 I have made it worked but halfway :-(

 I have written a redirect rule as

 `
 RewriteCond %{HTTP_HOST} ^testyou.mydomain.com
 RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
 [R=301,L]

 `

 So http://testyou.mydomain.com should redirect to
 http://www.mydomain.com\?domain=testyou.mydomain.com

 But with the above rule the link redirects to

 http://www.mydomain.com\?=testyou.mydomain.com

 So without the *domain* in between.

 Could any one suggest to

 [1] how can I fixed this so the *domain* appears like
 http://www.mydomain.com\?domain=testyou.mydomain.com

 [2] Can there be any arrangement so that I can use bulk redirection ?
 Say putting a variable in place of testyou.mydomain.com , so that those
 two rules can effectively redirect all subdomains pointed to that server
 ? I don't know if it really possible. Any sugestion/clue please ?

 Thanks



>>> [1] is fixed  by
>>>
>>> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
>>> [R=301,L]
>>>
>>> [2] Is there any way to modify the rule for bulk domain or should I
>>> write the rule set for each individual domain ?
>>>
>>> Thanks for our time
>>>
>>>
>>> --
>>> জয়দীপ বক্সী
>>>
>>>
>>> -
>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>> See http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>
>>>
>>
>> How you got [1] fixed, there's no change in the rule !
>>
>> For bulk redirection within subdomains I suggest this:
>>
>> RewrtieCond %{HTTP_HOST} (.+).mydomain.com$
>> RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST} [R=301]
>>
>>
>
>
> Hello Nilesh,
>
> Thank for your response.  But the rule produce an internal server error
> ( code 500 ).
>
> Presently what I am using for each individual domain are
>
> ```
> RewriteCond %{HTTP_HOST} ^domain1.Adomain.com
> RewriteRule ^(.*)$ http://www.mytestsite.com\?domain=domain1.Adomain.com
> [R=301,L]
>
> RewriteCond %{HTTP_HOST} ^domain1.Bdomain.com
> RewriteRule ^(.*)$ http://www.mytestsite.com\?domain=domain1.Bdomain.com
> [R=301,L]
>
> 
>
> All the dub-domains ( domain1.Adomain.com etc...) are pointed to the server.
>
> --
> জয়দীপ বক্সী
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

I assume that you want to redirect abcd.mydomain.com to
www.mydomain.com/?domain=abcd.mydomain.com
Considering that scenario and limiting subdomains only to
mydomain.com, the following rule works (I've tested them on my
server):

RewriteEngine On
RewriteCond %{HTTP_HOST} (.+).mydomain.com$
RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST}

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread J. Bakshi
On 05/27/2010 01:59 PM, Nilesh Govindarajan wrote:
> I assume that you want to redirect abcd.mydomain.com to
> www.mydomain.com/?domain=abcd.mydomain.com
> Considering that scenario and limiting subdomains only to
> mydomain.com, the following rule works (I've tested them on my
> server):
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} (.+).mydomain.com$
> RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST}
>
>   
Ok, but is it possible to extend these rule sets so that It can also
work with other domains too ? Say by using any variable in RewriteCond 
which can hold the requested domain name and delivered it in the 
RewriteRule

Please let me know if it is possible.
Thanks

-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 9:50 AM, J. Bakshi  wrote:
> On 05/27/2010 01:59 PM, Nilesh Govindarajan wrote:
>> I assume that you want to redirect abcd.mydomain.com to
>> www.mydomain.com/?domain=abcd.mydomain.com
>> Considering that scenario and limiting subdomains only to
>> mydomain.com, the following rule works (I've tested them on my
>> server):
>>
>> RewriteEngine On
>> RewriteCond %{HTTP_HOST} (.+).mydomain.com$
>> RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST}
>>
>>
> Ok, but is it possible to extend these rule sets so that It can also
> work with other domains too ? Say by using any variable in RewriteCond
> which can hold the requested domain name and delivered it in the
> RewriteRule
>
> Please let me know if it is possible.
> Thanks
>

No offence meant here, but I see you posting here all the time. This
information is clearly explained in the apache manual, perhaps you may
need to give it another glance, specifically at backreferences?

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule

RewriteCond %{HTTP_HOST} (.+)
RewriteRule .* http://foo/?domain=%1

Cheers

Tom

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread J. Bakshi
On 05/27/2010 02:33 PM, Tom Evans wrote:
> On Thu, May 27, 2010 at 9:50 AM, J. Bakshi  wrote:
>   
>> On 05/27/2010 01:59 PM, Nilesh Govindarajan wrote:
>> 
>>> I assume that you want to redirect abcd.mydomain.com to
>>> www.mydomain.com/?domain=abcd.mydomain.com
>>> Considering that scenario and limiting subdomains only to
>>> mydomain.com, the following rule works (I've tested them on my
>>> server):
>>>
>>> RewriteEngine On
>>> RewriteCond %{HTTP_HOST} (.+).mydomain.com$
>>> RewriteRule (.*) http://www.mydomain.com/?domain=%{HTTP_HOST}
>>>
>>>
>>>   
>> Ok, but is it possible to extend these rule sets so that It can also
>> work with other domains too ? Say by using any variable in RewriteCond
>> which can hold the requested domain name and delivered it in the
>> RewriteRule
>>
>> Please let me know if it is possible.
>> Thanks
>>
>> 
> No offence meant here, but I see you posting here all the time. This
>   

Yes, I post here frequently and I get some really nice solution from
this list.  IS it an offense ?


> information is clearly explained in the apache manual, perhaps you may
> need to give it another glance, specifically at backreferences?
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule
>
> RewriteCond %{HTTP_HOST} (.+)
> RewriteRule .* http://foo/?domain=%1
>
>
>   

Thanks for your help


-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 10:23 AM, J. Bakshi  wrote:
>
> Yes, I post here frequently and I get some really nice solution from
> this list.  IS it an offense ?
>
>

You don't ever look to see what your solution could be, by using the
resources provided - eg the excellent manual. You simply ask your
obvious questions and produce mailing list noise. I consider that
rude, but maybe I'm weird.

I can understand a beginner doing this, but you are clearly not a beginner.

Cheers

Tom

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread J. Bakshi
On 05/27/2010 02:59 PM, Tom Evans wrote:
> On Thu, May 27, 2010 at 10:23 AM, J. Bakshi  wrote:
>   
>> Yes, I post here frequently and I get some really nice solution from
>> this list.  IS it an offense ?
>>
>>
>> 
> You don't ever look to see what your solution could be, by using the
> resources provided - eg the excellent manual. You simply ask your
> obvious questions and produce mailing list noise. I consider that
> rude, but maybe I'm weird.
>
> I can understand a beginner doing this, but you are clearly not a beginner.
>
>   

This is not true.  I admit the link you have provided is useful and I
have not seen it before you pointed. Full credit to you. But it is not
that I ask my obvious question here without any search.  Anyways I can't
stop you to think such. 

-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 10:42 AM, J. Bakshi  wrote:
> On 05/27/2010 02:59 PM, Tom Evans wrote:
>> On Thu, May 27, 2010 at 10:23 AM, J. Bakshi  wrote:
>>
>>> Yes, I post here frequently and I get some really nice solution from
>>> this list.  IS it an offense ?
>>>
>>>
>>>
>> You don't ever look to see what your solution could be, by using the
>> resources provided - eg the excellent manual. You simply ask your
>> obvious questions and produce mailing list noise. I consider that
>> rude, but maybe I'm weird.
>>
>> I can understand a beginner doing this, but you are clearly not a beginner.
>>
>>
>
> This is not true.  I admit the link you have provided is useful and I
> have not seen it before you pointed. Full credit to you. But it is not
> that I ask my obvious question here without any search.  Anyways I can't
> stop you to think such.
>

Thats exactly my point - that isn't revolutionary documentation.
You're asking about 'redirect issues', but say you haven't ever
bothered to read the manual sections on RewriteCond and RewriteRule.

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



Re: [us...@httpd] Stealthing a vhost

2010-05-27 Thread Peter Horn

J Greenlees wrote:

>personally, I would consider a permanent redirect to 127.0.0.1 for all 
but your one excepted case on access of the default virtual host.

>their bots will screw their own server that way. ;)

Sorry to bring you the bad news, Jaqui, but bots don't respect 
redirection. I suspect they discard any response not bearing 200. I 
tried the 127.0.0.1 trick months ago to no effect, and have also tried 
redirection into private IP address space (eg 10.x.x.x). So I guess I'll 
just continue to suffer in (relative) silence. [If redirection did work 
on bots, I was going to find the most evil virus-ridden hellhole to send 
them to!]


Igor Cicimov wrote:

>Ok for the first problem, apache responding to the OPTIONS 
request...What about Limit and LimitExcept commands? Limiting the 
>OPTIONS to the local network or blocking them totally maybe?


I'm not too concerned about OPTIONS - it isn't used in any intrusion 
attempts, and IS used on my local network.  I mentioned it just to point 
out that it's a server thing, not a vhost one.


Regards and thanks,
Peter

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 3:18 PM, Tom Evans  wrote:
> On Thu, May 27, 2010 at 10:42 AM, J. Bakshi  wrote:
>> On 05/27/2010 02:59 PM, Tom Evans wrote:
>>> On Thu, May 27, 2010 at 10:23 AM, J. Bakshi  wrote:
>>>
 Yes, I post here frequently and I get some really nice solution from
 this list.  IS it an offense ?



>>> You don't ever look to see what your solution could be, by using the
>>> resources provided - eg the excellent manual. You simply ask your
>>> obvious questions and produce mailing list noise. I consider that
>>> rude, but maybe I'm weird.
>>>
>>> I can understand a beginner doing this, but you are clearly not a beginner.
>>>
>>>
>>
>> This is not true.  I admit the link you have provided is useful and I
>> have not seen it before you pointed. Full credit to you. But it is not
>> that I ask my obvious question here without any search.  Anyways I can't
>> stop you to think such.
>>
>
> Thats exactly my point - that isn't revolutionary documentation.
> You're asking about 'redirect issues', but say you haven't ever
> bothered to read the manual sections on RewriteCond and RewriteRule.
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Guys stop fighting. The problem has been solved. That's all. (.)

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] .htaccess redirect issue

2010-05-27 Thread J. Bakshi
On 05/27/2010 05:22 PM, Nilesh Govindarajan wrote:
> Guys stop fighting. The problem has been solved. That's all. (.)
>
>   

I have already kept myself silence Nilesh. Thanks for your kind clues
and also thanks to Tom as he has pointed out some really good links for me.

Wish you all a nice time.

-- 
জয়দীপ বক্সী


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



Re: [us...@httpd] Stealthing a vhost

2010-05-27 Thread Jorge Schrauwen
The sane sultion would be to setup a default host (first vhost == default)
and just deny all access to it.

You'll still get hit but all requests without a hostname get denied.

~Jorge


On Thu, May 27, 2010 at 1:10 PM, Peter Horn  wrote:

> J Greenlees wrote:
>
> >personally, I would consider a permanent redirect to 127.0.0.1 for all but
> your one excepted case on access of the default virtual host.
> >their bots will screw their own server that way. ;)
>
> Sorry to bring you the bad news, Jaqui, but bots don't respect redirection.
> I suspect they discard any response not bearing 200. I tried the 127.0.0.1
> trick months ago to no effect, and have also tried redirection into private
> IP address space (eg 10.x.x.x). So I guess I'll just continue to suffer in
> (relative) silence. [If redirection did work on bots, I was going to find
> the most evil virus-ridden hellhole to send them to!]
>
>
> Igor Cicimov wrote:
>
> >Ok for the first problem, apache responding to the OPTIONS request...What
> about Limit and LimitExcept commands? Limiting the >OPTIONS to the local
> network or blocking them totally maybe?
>
> I'm not too concerned about OPTIONS - it isn't used in any intrusion
> attempts, and IS used on my local network.  I mentioned it just to point out
> that it's a server thing, not a vhost one.
>
> Regards and thanks,
> Peter
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>  "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Krist van Besien
Hello,

I'm not entirely sure what your problem is. There is not a single
question in your mail.

What is your problem? What are you trying to achieve? What are you
getting in stead?

Krist


-- 
krist.vanbes...@gmail.com
kr...@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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



Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Eric Covener
On Thu, May 27, 2010 at 8:36 AM, Krist van Besien
 wrote:
> Hello,
>
> I'm not entirely sure what your problem is. There is not a single
> question in your mail.
>
> What is your problem? What are you trying to achieve? What are you
> getting in stead?

+1 -- I punched out before reading the entire thing due to
length/clarity.  On lists like this, summarize then provide supporting
detail

-- 
Eric Covener
cove...@gmail.com

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



Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 2:20 PM, Eric Covener  wrote:
> On Thu, May 27, 2010 at 8:36 AM, Krist van Besien
>  wrote:
>> Hello,
>>
>> I'm not entirely sure what your problem is. There is not a single
>> question in your mail.
>>
>> What is your problem? What are you trying to achieve? What are you
>> getting in stead?
>
> +1 -- I punched out before reading the entire thing due to
> length/clarity.  On lists like this, summarize then provide supporting
> detail
>

Unfortunately, I think I know what he means :/

You are trying to reverse proxy to a plone/zope instance. Plone/Zope
doesn't look at the incoming headers to determine what URLs it should
generate, it looks at the requested 'VirtualHostBase' to generate
absolute URLs. In this case, you have specified VirtualHostBase with
an IP address, so plone/zope will generate absolute URLs with that IP
address, which is your problem.

You will want to change this URL in the rewrite:

http://127.0.0.1:8080/VirtualHostBase/http/192.168.1.5:8080/eduCommons/VirtualHostRoot/$1

to something like this:

http://127.0.0.1:8080/VirtualHostBase/http/site5.abc.com/eduCommons/VirtualHostRoot/$1

(this is making me feel ill trying to remember this stuff)

Cheers

Tom

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



Re: [us...@httpd] graceful restart occasionally gives "could not bind" error

2010-05-27 Thread Raphael Bauduin
On Thu, May 27, 2010 at 5:36 AM, Igor Cicimov  wrote:
> Loading the dav module twice in your config?

I can confirm the problem is not caused by the webdav module. I have
disabled it (it wasn't used) and just got the same problem. Here's the
log:

[Thu May 27 15:30:30 2010] [notice] Graceful restart requested, doing restart
[Thu May 27 15:30:35 2010] [crit] (22)Invalid argument: make_sock: for
address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
(48)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs

Any suggestion welcome!

Thx

Raph


>
>
> On Wed, May 26, 2010 at 11:22 PM, Raphael Bauduin  wrote:
>>
>> Hi,
>>
>> With an apache 2.2 running on FreeBSD, I occasionally get a problem
>> with a graceful restart.
>> Issuing the command apachectl graceful results in these messages in
>> the error log:
>>
>> [Wed May 26 14:45:48 2010] [notice] Graceful restart requested, doing
>> restart
>> [Wed May 26 14:45:53 2010] [warn] module dav_module is already loaded,
>> skipping
>> [Wed May 26 14:45:53 2010] [crit] (22)Invalid argument: make_sock: for
>> address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
>> (48)Address already in use: make_sock: could not bind to address
>> 0.0.0.0:443
>> no listening sockets available, shutting down
>>
>> or this
>>
>> [Wed May 26 15:02:52 2010] [notice] Graceful restart requested, doing
>> restart
>> [Wed May 26 15:02:57 2010] [warn] module dav_module is already loaded,
>> skipping
>> (48)Address already in use: make_sock: could not bind to address [::]:443
>>
>>
>>
>> This error is not systematic, but it makes the command unreliable and
>> unusable in a cron task.
>>
>> Any hint as to what causes this problem?
>>
>> Thanks in advance!
>>
>> Raph
>>
>>
>>
>> --
>> Web database: http://www.myowndb.com
>> Free Software Developers Meeting: http://www.fosdem.org
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>
>



-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

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



Re: [us...@httpd] graceful restart occasionally gives "could not bind" error

2010-05-27 Thread Jeff Trawick
On Wed, May 26, 2010 at 9:22 AM, Raphael Bauduin  wrote:
> Hi,
>
> With an apache 2.2 running on FreeBSD

which level of Apache? (2.2.9 had a change in this area of processing)
which level of FreeBSD?

>, I occasionally get a 
> problem
> with a graceful restart.
> Issuing the command apachectl graceful results in these messages in
> the error log:
>
> [Wed May 26 14:45:48 2010] [notice] Graceful restart requested, doing restart
> [Wed May 26 14:45:53 2010] [warn] module dav_module is already loaded, 
> skipping
> [Wed May 26 14:45:53 2010] [crit] (22)Invalid argument: make_sock: for
> address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
> (48)Address already in use: make_sock: could not bind to address 0.0.0.0:443
> no listening sockets available, shutting down

hmmm...  dunno why setting that socket option is failing (the first
[crit] message)

if you don't need IPv6, change your Listen directive from "Listen 443"
to "Listen 0.0.0.0:443" to work around the problem, whatever it is


>
> or this
>
> [Wed May 26 15:02:52 2010] [notice] Graceful restart requested, doing restart
> [Wed May 26 15:02:57 2010] [warn] module dav_module is already loaded, 
> skipping
> (48)Address already in use: make_sock: could not bind to address [::]:443
>
>
>
> This error is not systematic, but it makes the command unreliable and
> unusable in a cron task.
>
> Any hint as to what causes this problem?
>
> Thanks in advance!
>
> Raph
>
>
>
> --
> Web database: http://www.myowndb.com
> Free Software Developers Meeting: http://www.fosdem.org
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>



-- 
Born in Roswell... married an alien...

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



Re: [us...@httpd] graceful restart occasionally gives "could not bind" error

2010-05-27 Thread Scott Gifford
I don't have an answer for you, but here are a few troubleshooting tips I
have found helpful.

If you can make it happen pretty often, you could try doing an
strace/truss/ktrace (I think it's ktrace on BSD) of the process to see what
system calls it's making and exactly which is failing.  You could also try
running "netstat -an |grep :443" right before and after you run it to see if
there's anything else listening on port 443.

One possibility is that the SO_REUSEADDR socket option somehow isn't being
set, which would be visible in a trace.

Another possibility may be that a child process is doing something with the
socket that prevents it from being closed.  You could look in the logs
between restarts and see if that gives a clue.  Maybe there's one script
that is triggering this, for example.  If you tried a graceful restart every
minute or less, the log interval might be small enough to give you useful
information.

You could also try systematically disabling things and see if that helps,
starting with any modules that aren't used.

I have had similar problems on earlier versions of Apache but was never able
to figure them out.  They would only happen once or twice a year, so I
wasn't able to do much troubleshooting.  I know that doesn't help, but maybe
it's nice to know that you're not the only one who has seen problems like
this.

Hope this helps!

-Scott.


On Thu, May 27, 2010 at 10:17 AM, Jeff Trawick  wrote:

> On Wed, May 26, 2010 at 9:22 AM, Raphael Bauduin 
> wrote:
> > Hi,
> >
> > With an apache 2.2 running on FreeBSD
>
> which level of Apache? (2.2.9 had a change in this area of processing)
> which level of FreeBSD?
>
> >, I occasionally get a
> problem
> > with a graceful restart.
> > Issuing the command apachectl graceful results in these messages in
> > the error log:
> >
> > [Wed May 26 14:45:48 2010] [notice] Graceful restart requested, doing
> restart
> > [Wed May 26 14:45:53 2010] [warn] module dav_module is already loaded,
> skipping
> > [Wed May 26 14:45:53 2010] [crit] (22)Invalid argument: make_sock: for
> > address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
> > (48)Address already in use: make_sock: could not bind to address
> 0.0.0.0:443
> > no listening sockets available, shutting down
>
> hmmm...  dunno why setting that socket option is failing (the first
> [crit] message)
>
> if you don't need IPv6, change your Listen directive from "Listen 443"
> to "Listen 0.0.0.0:443" to work around the problem, whatever it is
>
>
> >
> > or this
> >
> > [Wed May 26 15:02:52 2010] [notice] Graceful restart requested, doing
> restart
> > [Wed May 26 15:02:57 2010] [warn] module dav_module is already loaded,
> skipping
> > (48)Address already in use: make_sock: could not bind to address [::]:443
> >
> >
> >
> > This error is not systematic, but it makes the command unreliable and
> > unusable in a cron task.
> >
> > Any hint as to what causes this problem?
> >
> > Thanks in advance!
> >
> > Raph
> >
> >
> >
> > --
> > Web database: http://www.myowndb.com
> > Free Software Developers Meeting: http://www.fosdem.org
> >
> > -
> > The official User-To-User support forum of the Apache HTTP Server
> Project.
> > See http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
> >
>
>
>
> --
> Born in Roswell... married an alien...
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Jeff Trawick
On Wed, May 26, 2010 at 9:24 AM, Chen Chien-Yu  wrote:
> Hi,
>
> I encountered a problem after upgrading Apache to 2.2.15.
> The client will be stuck and load infinitely via the HTTP protocol, but it
> worked correctly in 2.0.55 before I upgraded.

what OS?

you probably need to get a syscall trace (strace, truss, etc.) of the
child process handling the request up until the point of failure, and
also attach to the child with a debugger (gdb, dbx, etc.) and get a
backtrace

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



Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi Jeff,

Thanks for your reply.
My OS is Linux with kernel 2.6.x.
Actually, as your suggest, I've been tracing the Apache source code for a
couple of days.
I'm new to the Apache, seems that something wrong between GNU CGI and
mod_cgi, not sure. But I might give up the upgrading due to the limited
time.

Thanks.

Best regards,
honercek

On Fri, May 28, 2010 at 12:27 AM, Jeff Trawick  wrote:

> On Wed, May 26, 2010 at 9:24 AM, Chen Chien-Yu  wrote:
> > Hi,
> >
> > I encountered a problem after upgrading Apache to 2.2.15.
> > The client will be stuck and load infinitely via the HTTP protocol, but
> it
> > worked correctly in 2.0.55 before I upgraded.
>
> what OS?
>
> you probably need to get a syscall trace (strace, truss, etc.) of the
> child process handling the request up until the point of failure, and
> also attach to the child with a debugger (gdb, dbx, etc.) and get a
> backtrace
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[us...@httpd] install certificate on httpd

2010-05-27 Thread gping

I am using Fedora 10 httpd. By default, I can http:// and https:// to the
host. 
Now I want to 

1. disable http://  ie disable port 80 and keep https:// or port 443 only.
I am still using the default DocumentRoot  /var/www/html/.
I am confused if I should use Listen 443 or Listen x.x.x.x:443 or ServerName
aaa.com:443 .
because when I /etc/init.d/httpd restart, it complainted 443 is already
bind...

2. I use openssl to self-signed a certificate:
openssl genrsa -des3 -out server.key 4096 
openssl req -new -key server.key -out server.csr 
openssl x509 -req -days 365 -in server.csr -signkey server.key -out
server.crt 

Then I add 
SSLEngine  on
SSLCertificateFile /home/test/server.crt
SSLCertificateKeyFile /home/test/server.key
just below the line of DocumentRoot

but the https://  result is it still showed default system certificate
(something like localhost..) not my self-signed one.

At this stage I dont plan to use  ... to include the above
certificate.
Could someone please help. Thanks a lot.
-- 
View this message in context: 
http://old.nabble.com/install-certificate-on-httpd-tp28702259p28702259.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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



[us...@httpd] Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi,

I'm not familiar with the bucket, brigade at all.
It seems that the chunk will be sent via bucket brigade.
I found the stuck happen when the length of the bucket is "0" and the next
length of the bucket is "5" (0\r\n\r\n, is this the last chunk?).

Why isn't the last chunk inserted in the bucket with web data?
Why the last two buckets with zero and five length aren't sent out?

Thanks

Best regards,
honercek

On Wed, May 26, 2010 at 9:24 PM, Chen Chien-Yu  wrote:

> Hi,
>
> I encountered a problem after upgrading Apache to 2.2.15.
> The client will be stuck and load infinitely via the HTTP protocol, but it
> worked correctly in 2.0.55 before I upgraded.
>
> I tried to sniffer the packet, and found
> 1. If the page size is larger, most of the page and http header will be
> received in the client but the last chunk won't be sent out from the Apache.
> 2. If the page size is small, the client only can see the http header.
>
> It seems that some packets are queued in the Apache, ..?!
> I describe the process as below,
> 1. Client send http request to the server, http://myhost/web.cgi, the cgi
> is implemented in GNU CGI which has been dead since 2002.
> 2. web.cgi fetches the login.html file and sends back to the client.
> 3. The client gets stuck...
>
> There are some things weird:
> 1. When I remove the directive "Listen 443" or "Keepalive On", then the
> HTTP can work correctly via "Listen 80" without stall.
> 2. If both the "Listen 443" and "Listen 80" are enabled, only the HTTPS can
> work. HTTP will have the problem I just mentioned.
>
> Do you guys have any idea about my problem?
> Why the behavior of dealing with output file is different between HTTP and
> HTTPS protocol?
>
>
>
> My Apache configuration
>
> ServerRoot "/usr/local/apache"
> ServerName localhost
> PidFile /var/run/httpd.pid
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> 
> StartServers 5
> MinSpareServers  5
> MaxSpareServers 20
> ServerLimit 2
> MaxClients   41
> MaxRequestsPerChild  1
> 
> 
> NumServers   5
> StartThreads 5
> MinSpareThreads  5
> MaxSpareThreads 10
> MaxThreadsPerChild  20
> 
> Listen 80
> User www
> Group www
> ServerAdmin y...@example.com
> UseCanonicalName Off
> DocumentRoot "/usr/local/apache/htdocs"
> "
> Options FollowSymLinks ExecCGI
> AllowOverride none
> Order allow,deny
> Allow from all
> 
> UserDir diabled
> ErrorLog /var/log/error_log
> LogLevel warn
> "
>   AllowOverride None
>   Options None
>   Order allow,deny
>   Allow from all
> 
> TypesConfig conf/mime.types
> DefaultType text/plain
> 
> MIMEMagicFile conf/magic
> 
> DirectoryIndex web.cgi
>
> AddHandler cgi-script .cgi
> HostnameLookups Off
>
> ServerTokens Full
> ServerSignature On
> ReadmeName README.html
> HeaderName HEADER.html
> IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
>
> BrowserMatch "Mozilla/2" nokeepalive
> BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
> BrowserMatch "RealPlayer 4\.0" force-response-1.0
> BrowserMatch "Java/1\.0" force-response-1.0
> BrowserMatch "JDK/1\.0" force-response-1.0
> BrowserMatch "Microsoft Data Access Internet Publishing Provider"
> redirect-caref
> BrowserMatch "^WebDrive" redirect-carefully
> BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
> BrowserMatch "^gnome-vfs" redirect-carefully
>
> Listen 443
> 
> AddType application/x-x509-ca-cert .crt
> AddType application/x-pkcs7-crl.crl
> SSLPassPhraseDialog builtin
> SSLSessionCache  dbm:/var/log/ssl_scache
> SSLSessionCacheTimeout  300
> SSLMutex file:/var/log/ssl_mutex
> SSLRandomSeed startup builtin
> SSLRandomSeed connect builtin
> SSLCryptoDevice cryptodev
> 
> DocumentRoot "/usr/local/apache/htdocs"
> ServerName www.example.com
> ServerAdmin y...@example.com
> ErrorLog /var/log/error_log
> TransferLog /var/log/access_log
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:-RC4:+AES:+DES:+3DES:+RSA:-RC2:-IDEA:+HIGH:+ME
> SSLCertificateFile /etc/cert/default
> SSLCertificateKeyFile /etc/cert/default.prv
> 
>   SSLOptions +StdEnvVars
> 
> 
>   SSLOptions +StdEnvVars
> 
> SetEnvIf User-Agent ".*MSIE.*" \
> nokeepalive ssl-unclean-shutdown \
> downgrade-1.0 force-response-1.0
> 
> 
>
>
> Thanks in advance.
>
> Best regards
> honercek
>
>


Re: [us...@httpd] install certificate on httpd

2010-05-27 Thread Nilesh Govindarajan
On Fri, May 28, 2010 at 8:29 AM, gping  wrote:
>
> I am using Fedora 10 httpd. By default, I can http:// and https:// to the
> host.
> Now I want to
>
> 1. disable http://  ie disable port 80 and keep https:// or port 443 only.
> I am still using the default DocumentRoot  /var/www/html/.
> I am confused if I should use Listen 443 or Listen x.x.x.x:443 or ServerName
> aaa.com:443 .
> because when I /etc/init.d/httpd restart, it complainted 443 is already
> bind...
>
> 2. I use openssl to self-signed a certificate:
> openssl genrsa -des3 -out server.key 4096
> openssl req -new -key server.key -out server.csr
> openssl x509 -req -days 365 -in server.csr -signkey server.key -out
> server.crt
>
> Then I add
> SSLEngine  on
> SSLCertificateFile /home/test/server.crt
> SSLCertificateKeyFile /home/test/server.key
> just below the line of DocumentRoot
>
> but the https://  result is it still showed default system certificate
> (something like localhost..) not my self-signed one.
>
> At this stage I dont plan to use  ... to include the above
> certificate.
> Could someone please help. Thanks a lot.
> --
> View this message in context: 
> http://old.nabble.com/install-certificate-on-httpd-tp28702259p28702259.html
> Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Fedora's default httpd installation configures mod_ssl in
/etc/httpd/conf.d/ssl.conf
Edit that and your problem should be solved. I think you're trying to
edit the configuration right into /etc/httpd/conf/httpd.conf ?

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread William A. Rowe Jr.
On 5/27/2010 10:44 PM, Chen Chien-Yu wrote:
> Hi,
> 
> I'm not familiar with the bucket, brigade at all.
> It seems that the chunk will be sent via bucket brigade.
> I found the stuck happen when the length of the bucket is "0" and the
> next length of the bucket is "5" (0\r\n\r\n, is this the last chunk?).
> 
> Why isn't the last chunk inserted in the bucket with web data?
> Why the last two buckets with zero and five length aren't sent out?

Most likely whatever appended a 5 byte bucket at the end forgot to pay
attention to the EOS bucket that marked the end of the stream.

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



Re: [us...@httpd] install certificate on httpd

2010-05-27 Thread gping

Thanks for your quick reply. 
I was focusing on httpd.conf. And now i try to modify ssl.conf.
Q: how to make the web site https:// only? 
If I simply hash out Listen 80, it still responses.


-- 
View this message in context: 
http://old.nabble.com/install-certificate-on-httpd-tp28702259p28702534.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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



Re: [us...@httpd] Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi William,

Refer to your words, so it's a bug in the bucket brigade mechanism? Should I
report it to the Apache bug system?
The two buckets are processed in the ap_core_output_filter(), and in the
case of EOS bucket (APR_BUCKET_IS_EOS is true)
That's why, the specific two buckets aren't sent out anymore..?!

Thank

Best regards,
honercek


On Fri, May 28, 2010 at 11:54 AM, William A. Rowe Jr.
wrote:

> On 5/27/2010 10:44 PM, Chen Chien-Yu wrote:
> > Hi,
> >
> > I'm not familiar with the bucket, brigade at all.
> > It seems that the chunk will be sent via bucket brigade.
> > I found the stuck happen when the length of the bucket is "0" and the
> > next length of the bucket is "5" (0\r\n\r\n, is this the last chunk?).
> >
> > Why isn't the last chunk inserted in the bucket with web data?
> > Why the last two buckets with zero and five length aren't sent out?
>
> Most likely whatever appended a 5 byte bucket at the end forgot to pay
> attention to the EOS bucket that marked the end of the stream.
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] install certificate on httpd

2010-05-27 Thread Nilesh Govindarajan
On Fri, May 28, 2010 at 9:33 AM, gping  wrote:
>
> Thanks for your quick reply.
> I was focusing on httpd.conf. And now i try to modify ssl.conf.
> Q: how to make the web site https:// only?
> If I simply hash out Listen 80, it still responses.
>
>
> --
> View this message in context: 
> http://old.nabble.com/install-certificate-on-httpd-tp28702259p28702534.html
> Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Hashing out Listen 80 and configuring any vhosts with :443 in
 and ServerName should help.
If it doesn't work, redirect it.

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] install certificate on httpd

2010-05-27 Thread Nilesh Govindarajan
On Fri, May 28, 2010 at 9:40 AM, Nilesh Govindarajan  wrote:
> On Fri, May 28, 2010 at 9:33 AM, gping  wrote:
>>
>> Thanks for your quick reply.
>> I was focusing on httpd.conf. And now i try to modify ssl.conf.
>> Q: how to make the web site https:// only?
>> If I simply hash out Listen 80, it still responses.
>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/install-certificate-on-httpd-tp28702259p28702534.html
>> Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>
>
> Hashing out Listen 80 and configuring any vhosts with :443 in
>  and ServerName should help.
> If it doesn't work, redirect it.
>
> --
> Nilesh Govindarajan
> Facebook: nilesh.gr
> Twitter: nileshgr
> Website: www.itech7.com
>


Err.. I meant configuring any port 80 vhosts with :443

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

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



Re: [us...@httpd] Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread William A. Rowe Jr.
On 5/27/2010 11:04 PM, Chen Chien-Yu wrote:
> Hi William,
> 
> Refer to your words, so it's a bug in the bucket brigade mechanism?
> Should I report it to the Apache bug system?
> The two buckets are processed in the ap_core_output_filter(), and in the
> case of EOS bucket (APR_BUCKET_IS_EOS is true)
> That's why, the specific two buckets aren't sent out anymore..?!

There is no bug in the core, when EOS is hit, that's it.

What module creates this missing 5 byte bucket?  Was it a 0 len chunk header?
If that never hits the wire, it sounds like it could be a bug, but I've seen
no other reports of similar buggy behavior in 2.2.15, so I tend to suspect a
module, and most likely an external one.

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



Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread William A. Rowe Jr.
On 5/26/2010 8:24 AM, Chen Chien-Yu wrote:
>  
> It seems that some packets are queued in the Apache, ..?!
> I describe the process as below,
> 1. Client send http request to the server, http://myhost/web.cgi, the
> cgi is implemented in GNU CGI which has been dead since 2002.

If the CGI closes the stream (EOF) then everything should still work out
alright.  How do you handle the CGI within httpd?  mod_cgi, mod_cgid, or
with mod_fcgid?  Or with some other module?


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



Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi William,

I reckon it should be mod_cgi, the CGI library I use is called "GNU CGI
Library in C, v0.9.5" which has been maintained for many years.

The function below is the way the CGI init and open the stream.

gcgiReturnType
initCgi( )
{
*/* Dup stdout to gcgiOut */*
*gcgifd = dup(fileno(stdout));*
*gcgiOut = fdopen(gcgifd, "w");*
.
.

}


Then, free the resource but I didn't see it close the file descriptor. It
duplicate the standard output, is that the reason that don't have to close
it? I've tried to close the stdout, stderr, gcgiOut, stdin, but that didn't
work.

void
freeCgi( )
{
freeCgiQuery();

if (envVariablesFile != NULL) XFREE(envVariablesFile);
if (cgiQueryFile != NULL) XFREE(cgiQueryFile);
}

Thanks,

Best regards,
honercek


On Fri, May 28, 2010 at 12:26 PM, William A. Rowe Jr.
wrote:

> On 5/26/2010 8:24 AM, Chen Chien-Yu wrote:
> >
> > It seems that some packets are queued in the Apache, ..?!
> > I describe the process as below,
> > 1. Client send http request to the server, http://myhost/web.cgi, the
> > cgi is implemented in GNU CGI which has been dead since 2002.
>
> If the CGI closes the stream (EOF) then everything should still work out
> alright.  How do you handle the CGI within httpd?  mod_cgi, mod_cgid, or
> with mod_fcgid?  Or with some other module?
>
>


Re: [us...@httpd] Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi William,

I've ever mentioned if I comment out the "Listen 443" and leave only the
"Listen 80", the client can get the page without problem via HTTP. (In this
successful case, I also see the two 0 and 5 length bucket, don't know why
they are sent out even reach the EOS)
The problem only exists  via HTTP when the "Listen 443" and "Listen 80"
coexist.
Browser is always fine in both case if I use HTTPS.

As the questions you said, I have to see what the answer are..but not sure
if I can figure them out.

Thanks

Best regards,
honercek


On Fri, May 28, 2010 at 12:14 PM, William A. Rowe Jr.
wrote:

> On 5/27/2010 11:04 PM, Chen Chien-Yu wrote:
> > Hi William,
> >
> > Refer to your words, so it's a bug in the bucket brigade mechanism?
> > Should I report it to the Apache bug system?
> > The two buckets are processed in the ap_core_output_filter(), and in the
> > case of EOS bucket (APR_BUCKET_IS_EOS is true)
> > That's why, the specific two buckets aren't sent out anymore..?!
>
> There is no bug in the core, when EOS is hit, that's it.
>
> What module creates this missing 5 byte bucket?  Was it a 0 len chunk
> header?
> If that never hits the wire, it sounds like it could be a bug, but I've
> seen
> no other reports of similar buggy behavior in 2.2.15, so I tend to suspect
> a
> module, and most likely an external one.
>


Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi,

These are the modules in my Apache

r...@~# /usr/local/apache/bin/httpd -l | more
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_log_config.c
  mod_env.c
  mod_expires.c
  mod_headers.c
  mod_setenvif.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_imagemap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

Thanks

Best regards,
honercek

On Fri, May 28, 2010 at 12:26 PM, William A. Rowe Jr.
wrote:

> On 5/26/2010 8:24 AM, Chen Chien-Yu wrote:
> >
> > It seems that some packets are queued in the Apache, ..?!
> > I describe the process as below,
> > 1. Client send http request to the server, http://myhost/web.cgi, the
> > cgi is implemented in GNU CGI which has been dead since 2002.
>
> If the CGI closes the stream (EOF) then everything should still work out
> alright.  How do you handle the CGI within httpd?  mod_cgi, mod_cgid, or
> with mod_fcgid?  Or with some other module?
>
>


Re: [us...@httpd] Stealthing a vhost

2010-05-27 Thread Peter Horn

Jorge wrote:
>The sane sultion would be to setup a default host (first vhost == 
default) and just deny all access to it.


>You'll still get hit but all requests without a hostname get denied.

Jorge,
You may have missed my original post a few days ago (95182). I know many 
ways to deny access; what I was asking for was a way to stealth, (i.e. 
not respond at all) on the default vhost and it appears there isn't for me.


Regards,
Peter



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



Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Nick Kew

On 28 May 2010, at 06:23, Chen Chien-Yu wrote:

> Hi William,
> 
> I reckon it should be mod_cgi, the CGI library I use is called "GNU CGI 
> Library in C, v0.9.5" which has been maintained for many years. 
> 
> The function below is the way the CGI init and open the stream.
> 
> gcgiReturnType
> initCgi( )
> {
> /* Dup stdout to gcgiOut */
> gcgifd = dup(fileno(stdout));
> gcgiOut = fdopen(gcgifd, "w");

Huh?  Why dup stdout?  And who manages closing it?

> Then, free the resource but I didn't see it close the file descriptor. It 
> duplicate the standard output, is that the reason that don't have to close 
> it? I've tried to close the stdout, stderr, gcgiOut, stdin, but that didn't 
> work.

You should be able (but not normally required) to close your file descriptors 
in CGI.
But the dup introduced unexpected complexity.

If all that's from the cgi lib you're using, maybe you should put it to the 
maintainers of that,
and perhaps try and post somewhere a minimal CGI program that demonstrates your 
problem.

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



Re: [us...@httpd] HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

2010-05-27 Thread Chen Chien-Yu
Hi Nick,

I have no idea why duplicate the stdout, and seems that no one deals with
the stream closing in the library.
Please have a look at the main source code,
http://www.sfr-fresh.com/unix/www/gcgi-0.9.5.tar.gz:a/libgcgi.a-0.9.5/src/gcgi.c

I guess this is the official website of this library, no activities since
2002. http://freshmeat.net/projects/gcgi/
Doubt that I would get response from them..

My CGI looks like this roughly.. (only the main structure and skip the
non-related parts)

main() {

  if(initCgi() != GCGISUCCESS) {
return -1;
  }

  if ((fs = fopen ("login.html", "r")) == NULL) {
return -2;
  }

  while ((c = getc (fs)) != EOF) {
.
putchar(c);
.
  }

  fclose(fs);
  freeCgi();

  return 0;
}

This is the example code the developers provided. I use almost the same code
flow as theirs.
http://www.sfr-fresh.com/unix/www/gcgi-0.9.5.tar.gz:a/libgcgi.a-0.9.5/examples/gcgiFileUploadTest.c

Thanks

Best regards,
honercek

On Fri, May 28, 2010 at 2:17 PM, Nick Kew  wrote:

>
> On 28 May 2010, at 06:23, Chen Chien-Yu wrote:
>
> > Hi William,
> >
> > I reckon it should be mod_cgi, the CGI library I use is called "GNU CGI
> Library in C, v0.9.5" which has been maintained for many years.
> >
> > The function below is the way the CGI init and open the stream.
> >
> > gcgiReturnType
> > initCgi( )
> > {
> > /* Dup stdout to gcgiOut */
> > gcgifd = dup(fileno(stdout));
> > gcgiOut = fdopen(gcgifd, "w");
>
> Huh?  Why dup stdout?  And who manages closing it?
>
> > Then, free the resource but I didn't see it close the file descriptor. It
> duplicate the standard output, is that the reason that don't have to close
> it? I've tried to close the stdout, stderr, gcgiOut, stdin, but that didn't
> work.
>
> You should be able (but not normally required) to close your file
> descriptors in CGI.
> But the dup introduced unexpected complexity.
>
> If all that's from the cgi lib you're using, maybe you should put it to the
> maintainers of that,
> and perhaps try and post somewhere a minimal CGI program that demonstrates
> your problem.
>
> --
> Nick Kew
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>