I need to programatically determine whether httpd is running or not,
whether I'm root or not. The only reliable way I have found is to use the
system command 'ps -C httpd' and grep the results.
Is there a better way?
Thanks.
Best regards,
-Tom
If you have httpd running as a service in Centos, you can run service httpd
status. It will return a status code of 0 if it is running.
% service httpd status > /dev/null
Redirecting to /bin/systemctl status httpd.service
% echo $?
0
From: Tom Browder [mailto:tom.brow...@gmail.com]
Sent: Tue
That grep would not work on Debian-style packages because they show apache2
as the executable but it might be the best way on other systems.
- Y
Sent from a device with a very small keyboard and hyperactive autocorrect.
On Feb 21, 2017 8:54 AM, "Tom Browder" wrote:
> I need to programatically
On Tue, Feb 21, 2017 at 07:58 Mike Schlottman wrote:
> If you have httpd running as a service in Centos, you can run service
> httpd status.
>
Thanks, Mike. But I'm running Debian and, for httpd, the old init.d thing.
I would love to get a systemd working for it, but I need a real cookbook
solut
On Tue, Feb 21, 2017 at 2:53 PM, Tom Browder wrote:
> I need to programatically determine whether httpd is running or not, whether
> I'm root or not. The only reliable way I have found is to use the system
> command 'ps -C httpd' and grep the results.
>
> Is there a better way?
If you know where
the existence of the PID file only gives a hint; its contents (the PID of
the process) should then be checked to see if that particular process is
indeed (still) running.
Citeren Rainer Canavan :
On Tue, Feb 21, 2017 at 2:53 PM, Tom Browder
wrote:
I need to programatically determine whether
On Tue, Feb 21, 2017 at 3:19 PM, Rainer Canavan
wrote:
> On Tue, Feb 21, 2017 at 2:53 PM, Tom Browder wrote:
>> I need to programatically determine whether httpd is running or not, whether
>> I'm root or not. The only reliable way I have found is to use the system
>> command 'ps -C httpd' and gre
On Mon, Feb 20, 2017 at 11:31 AM, Andrei Ivanov
wrote:
> On Fri, Feb 17, 2017 at 12:18 PM, Andrei Ivanov
> wrote:
>
>>
>> On Thu, Feb 16, 2017 at 9:26 PM, Eric Covener wrote:
>>
>>> On Thu, Feb 16, 2017 at 11:16 AM, Andrei Ivanov
>>> wrote:
>>> > Is there a way to debug this? To print the valu
On Tue, Feb 21, 2017 at 3:53 PM, Yann Ylavic wrote:
> On Tue, Feb 21, 2017 at 3:19 PM, Rainer Canavan
> wrote:
[...]
>> If you know where the .pid file is, you can read that and check if the
>> process is
>> running, e.g. via ps --pid `cat /var/run/apache2.pid`
>
> Or:
> kill -0 `cat /var/run
On Tue, Feb 21, 2017 at 4:50 PM, Andrei Ivanov wrote:
>>>
>>> Header set Client-SAN "%{PeerExtList('2.5.29.17')}s"
The syntax may be rather:
Header set Client-SAN "expr=%{PeerExtList:2.5.29.17}"
Does it work better?
-
To unsub
On Tue, Feb 21, 2017 at 6:32 PM, Yann Ylavic wrote:
> On Tue, Feb 21, 2017 at 4:50 PM, Andrei Ivanov
> wrote:
> >>>
> >>> Header set Client-SAN "%{PeerExtList('2.5.29.17')}s"
>
> The syntax may be rather:
>
> Header set Client-SAN "expr=%{PeerExtList:2.5.29.17}"
>
> Does it work better?
>
Uf, n
On Tue, Feb 21, 2017 at 8:15 AM, Yehuda Katz wrote:
> That grep would not work on Debian-style packages because they show apache2
> as the executable but it might be the best way on other systems.
Good point, Yehuda. I guess I should find out
But I just looked at my ps output and it shows the c
On Tue, Feb 21, 2017 at 6:43 PM, Andrei Ivanov
wrote:
> On Tue, Feb 21, 2017 at 6:32 PM, Yann Ylavic wrote:
>
>> On Tue, Feb 21, 2017 at 4:50 PM, Andrei Ivanov
>> wrote:
>> >>>
>> >>> Header set Client-SAN "%{PeerExtList('2.5.29.17')}s"
>>
>> The syntax may be rather:
>>
>> Header set Client-SA
Hi Mike,
2017-02-20 18:17 GMT+01:00 Mike Schlottman :
> I’m trying to configure apache 2.4 to show nice error pages to external
> users of our web site, while allowing staff to see the real error. The
> idea is to prevent exposing privileged information to the general public
> while allowing ou
Thanks Luca. This all makes sense with what I was seeing. I ended up using
something similar to what you suggested. Here it is in case it ever helps
someone.
ErrorDocument 400 /errors/400
ErrorDocument 401 /errors/401
ErrorDocument 402 /errors/402
ErrorDocument 403 /errors/403
Er
On Tue, Feb 21, 2017 at 5:43 PM, Andrei Ivanov wrote:
> On Tue, Feb 21, 2017 at 6:32 PM, Yann Ylavic wrote:
>>
>> On Tue, Feb 21, 2017 at 4:50 PM, Andrei Ivanov
>> wrote:
>> >>>
>> >>> Header set Client-SAN "%{PeerExtList('2.5.29.17')}s"
>>
>> The syntax may be rather:
>>
>> Header set Client-SA
On Wed, Feb 22, 2017 at 1:09 AM, Yann Ylavic wrote:
> On Tue, Feb 21, 2017 at 5:43 PM, Andrei Ivanov
> wrote:
>> On Tue, Feb 21, 2017 at 6:32 PM, Yann Ylavic wrote:
>>>
>>> On Tue, Feb 21, 2017 at 4:50 PM, Andrei Ivanov
>>> wrote:
>>> >>>
>>> >>> Header set Client-SAN "%{PeerExtList('2.5.29.17
17 matches
Mail list logo