[users@httpd] htaccess looping

2017-09-13 Thread Marek Sloboda
Hi, I've got problem with htaccess configuration. On my site i have 3 types of 
access

http://zeroproblem.pl -> direct to directory test2/index.php (which is file)
http://zeroproblem.pl/zeroproblem -> direct to directory test2/zeroproblem 
(which is directory)
http://zeroproblem.pl/admin -> is parameter and it should be like 
index.php?url=admin

my htaccess file:
php_flag  display_errorson
Options -Indexes
Options -MultiViews
RewriteEngine On

#RewriteBase /test2/zeroproblem/
#usunięcie www.
RewriteCond %{HTTP_HOST} ^(www\.)zeroproblem\.pl$ [NC]
RewriteRule ^(.*)$ http://zeroproblem.pl/$1 [R=301,L]

# zeroproblem.pl/zeroproblem  - err 404 workaround for forbiden file

RewriteCond %{HTTP_HOST} ^(www\.)?zeroproblem\.pl$ [NC]
RewriteCond %{REQUEST_URI} ^/(.*)$ [NC]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^(.*)$ /index.php [QSA,L] 

# zeroproblem/admin
RewriteCond %{HTTP_HOST} ^(www\.)?zeroproblem\.pl$ 
RewriteCond %{REQUEST_URI} ^/(.*)$ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^(.*)$ /index.php?url=$1 [L,QSA] 

Above code is working, but problem is that when I'm starting new session on for 
ex. openinig http://zeroproblem.pl/index.php the page is loading 3 times. After 
many tests I found that problem is with 
RewriteCond %{REQUEST_FILENAME} !-f 
but I need that line for getitng to http://zeroproblem.pl/admin which is just 
parameter.
Please help me to understand problem.

P.S. My site is on sharing host, and I dont have access to conf.

Regards
Marek Słoboda 



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: AW: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Hemant Chaudhary
As i have seen in my system that master process also binds to port that i
have given in my configuration. Then how master process is binding to port
80 ? If i am running my apache other than root user then how can master
binds to port 80 ?

If i am running apache as root user then on any port my apache is working
but other than root user, i need to give port greater than 1024.

Thanks
Hemant

On Sep 13, 2017 5:56 PM, "Bremser, Kurt (Allianz Technology GmbH)" <
kurt.brem...@allianz.at> wrote:

> Spawning children servers one very important purpose: while the master has
> to be run as root to bind to the privileged port 80, the child is spawned
> as the user named in the configuration, reducing security issues by orders
> of magnitude.
> Changing that and running the whole server process (inlcuding spawned cgi
> scripts etc) as root would be extremely stupid, IMO.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> 
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
> Gesendet: Mittwoch, 13. September 2017 14:03
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Yes true. I want to start only one process and it should not spawn child
> processes.
> In apache, we have master process and then it spawns child. After that
> child serves requests by client.
> My aim is to start master process and it should not spawn child as well as
> it should serve requests from client.
>
> Thanks
> Hemant
>
> On Wed, Sep 13, 2017 at 5:18 PM, Bremser, Kurt (Allianz Technology GmbH) <
> kurt.brem...@allianz.at> wrote:
> In most cases, you can only have ONE process binding to ONE
> IP-address/port combination. Children of this process will then inherit the
> socket, which is the way how apache works.
>
> On Linux and BSD, there is the SO_REUSEPORT option that can be set by a
> listening process, so that other processes can also bind to the socket, and
> let the OS handle which incoming data ends up where.
> If you think about that, it opens the port up for hijacking, as the
> initial listener process has no idea which other processes might also bind
> to the port and intercept traffic.
>
> So the apache method of one master process binding to the port and
> spawning children is the prudent one.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> 
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com chaudh...@gmail.com>]
> Gesendet: Mittwoch, 13. September 2017 13:29
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Hi
>
> I want to create different processes not forking from parent or anywhere.
> It is still okay if parent process is started and parent process will not
> fork child processes but parent should serve requests.
>
> On Sep 13, 2017 4:47 PM, "Eric Covener" mailto:cove
> n...@gmail.com>>> wrote:
> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
> mailto:hemantdude.chaudh...@gmail.com
> > gmail.com>>> wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org unsubscr...@httpd.apache.org> >
> For additional commands, e-mail: users-h...@httpd.apache.org users-h...@httpd.apache.org>>
>
>
> Allianz Technology GmbH
> 1130 Wien, Hietzinger Kai 101-105
> FN 365014k, Handelsgericht Wien
> UID: ATU 66614737
>
> http://www.allianz.at
>
> 
> Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
> enthalten Informationen, die vertraulich und
> ausschliesslich fuer den (die) bezeichneten Adressaten
> bestimmt sind.
> Wenn Sie nicht der genannte Adressat sind, darf dieses
> E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen
> Personen zugaenglich gemacht noch in anderer Weise
> verwertet werden.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
> wir Sie, dieses E-Mail und saemtliche angeschlossene
> Anhaenge zu loeschen.
>
> Please note: This email and any file

Re: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Eric Covener
On Wed, Sep 13, 2017 at 8:03 AM, Hemant Chaudhary
 wrote:
> Yes true. I want to start only one process and it should not spawn child
> processes.
> In apache, we have master process and then it spawns child. After that child
> serves requests by client.
> My aim is to start master process and it should not spawn child as well as
> it should serve requests from client.

You could look into the -DONE_PROCESS option with a threaded MPM and
just use a single process.
But it all sounds like a pretty horrible plan.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



AW: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Bremser, Kurt (Allianz Technology GmbH)
Spawning children servers one very important purpose: while the master has to 
be run as root to bind to the privileged port 80, the child is spawned as the 
user named in the configuration, reducing security issues by orders of 
magnitude.
Changing that and running the whole server process (inlcuding spawned cgi 
scripts etc) as root would be extremely stupid, IMO.

Kurt Bremser
Allianz Technology GmbH

Newton was wrong. There is no gravity. The Earth sucks.

Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
Gesendet: Mittwoch, 13. September 2017 14:03
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Run apache without master [wd-vc]

Yes true. I want to start only one process and it should not spawn child 
processes.
In apache, we have master process and then it spawns child. After that child 
serves requests by client.
My aim is to start master process and it should not spawn child as well as it 
should serve requests from client.

Thanks
Hemant

On Wed, Sep 13, 2017 at 5:18 PM, Bremser, Kurt (Allianz Technology GmbH) 
mailto:kurt.brem...@allianz.at>> wrote:
In most cases, you can only have ONE process binding to ONE IP-address/port 
combination. Children of this process will then inherit the socket, which is 
the way how apache works.

On Linux and BSD, there is the SO_REUSEPORT option that can be set by a 
listening process, so that other processes can also bind to the socket, and let 
the OS handle which incoming data ends up where.
If you think about that, it opens the port up for hijacking, as the initial 
listener process has no idea which other processes might also bind to the port 
and intercept traffic.

So the apache method of one master process binding to the port and spawning 
children is the prudent one.

Kurt Bremser
Allianz Technology GmbH

Newton was wrong. There is no gravity. The Earth sucks.

Von: Hemant Chaudhary 
[hemantdude.chaudh...@gmail.com]
Gesendet: Mittwoch, 13. September 2017 13:29
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Run apache without master [wd-vc]

Hi

I want to create different processes not forking from parent or anywhere.
It is still okay if parent process is started and parent process will not fork 
child processes but parent should serve requests.

On Sep 13, 2017 4:47 PM, "Eric Covener" 
mailto:cove...@gmail.com>>>
 wrote:
On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
mailto:hemantdude.chaudh...@gmail.com>>>
 wrote:
> Hi,
>
> I want to start my apache without master process means when I will give
> "httpd" command, it should start 5 worker process which has access to
> httpd.conf as well as serve requests.
>
> Is it possible to achieve this ? If yes, then how should to achieve this ?

Not really. Why not just ignore the parent process? The worst thing
that can happen is that it doesn't manage the children, which you're
already losing in this hypothetical setup.

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org>


Allianz Technology GmbH
1130 Wien, Hietzinger Kai 101-105
FN 365014k, Handelsgericht Wien
UID: ATU 66614737

http://www.allianz.at


Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
enthalten Informationen, die vertraulich und
ausschliesslich fuer den (die) bezeichneten Adressaten
bestimmt sind.
Wenn Sie nicht der genannte Adressat sind, darf dieses
E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen
Personen zugaenglich gemacht noch in anderer Weise
verwertet werden.
Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
wir Sie, dieses E-Mail und saemtliche angeschlossene
Anhaenge zu loeschen.

Please note: This email and any files transmitted with it is
intended only for the named recipients and may contain
confidential and/or privileged information. If you are not the
intended recipient, please do not read, copy, use or disclose
the contents of this communication to others and notify the
sender immediately. Then please delete the email and any
copies of it. Thank you.



-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org
For additional commands, e-mail: 
users-h...@httpd.apache.org



Allianz Te

Re: [users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Norbert



On 09/13/17 14:05, Yann Ylavic wrote:

Hi Norbert,

can we keep the users@ mailing list CC-ed on this since it may be
relevant for others too?
Moreover people with a better knowledge of mod_perl than me could chime in...

On Wed, Sep 13, 2017 at 1:33 PM, Norbert  wrote:

thanks - but it does not help -

The case seems to be mod_perl specific (I know very few about it),
"normally" preforked processes have the lifetime given by these
directives...

Could it be a crash of children processes somehow, or a special
handling of processes in mod_perl?
The creation of multiple root processes at startup looks special to
me, usually httpd has a single root process to maintain children
(www:www) processes, is a root process still alive after the load?


For others on the list, your results below:


have a look, I use top in 1 second intervals
and extracted the httpd processes which have the user www.
The minus represent the 1 second gap:

-
-
30830 www1  240   326M 31884K select  0 0:00   0.00% httpd
30832 www1  270   326M 31636K select  4 0:00   0.00% httpd
30833 www1  270   326M 31636K select  5 0:00   0.00% httpd
30834 www1  270   326M 31636K select  1 0:00   0.00% httpd
30831 www1  270   326M 31644K select  6 0:00   0.00% httpd
30835 www1  270   326M 31632K select  0 0:00   0.00% httpd
-
30830 www1  240   326M 31884K select  0 0:00   0.49% httpd
30832 www1  270   326M 31636K select  4 0:00   0.49% httpd
30833 www1  270   326M 31636K select  5 0:00   0.49% httpd
30834 www1  270   326M 31636K select  1 0:00   0.49% httpd
30831 www1  270   326M 31644K select  6 0:00   0.49% httpd
30835 www1  270   326M 31632K select  0 0:00   0.49% httpd
-
30830 www1  210   326M 31928K select  3 0:00   0.39% httpd
30832 www1  270   326M 31636K select  4 0:00   0.39% httpd
30833 www1  270   326M 31636K select  5 0:00   0.39% httpd
30834 www1  270   326M 31636K select  1 0:00   0.39% httpd
30831 www1  270   326M 31644K select  6 0:00   0.39% httpd
30835 www1  270   326M 31632K select  0 0:00   0.39% httpd
-
30830 www1  210   330M 35880K select  3 0:00   0.59% httpd
30832 www1  270   326M 31636K select  4 0:00   0.29% httpd
30833 www1  270   326M 31636K select  5 0:00   0.29% httpd
30834 www1  270   326M 31636K select  1 0:00   0.29% httpd
30831 www1  270   326M 31644K select  6 0:00   0.29% httpd
30835 www1  270   326M 31632K select  0 0:00   0.29% httpd
-
30830 www1  210   330M 35880K select  3 0:00   0.49% httpd
30832 www1  270   326M 31636K select  4 0:00   0.20% httpd
30833 www1  270   326M 31636K select  5 0:00   0.20% httpd
30834 www1  270   326M 31636K select  1 0:00   0.20% httpd
30831 www1  270   326M 31644K select  6 0:00   0.20% httpd
30835 www1  270   326M 31632K select  0 0:00   0.20% httpd
-
30830 www1  210   330M 35900K select  4 0:00   0.39% httpd
30831 www1  200   326M 31652K select  4 0:00   0.20% httpd
30835 www1  200   326M 31636K select  6 0:00   0.10% httpd
-
30830 www1  200   330M 35900K select  1 0:00   0.29% httpd
30831 www1  200   326M 31876K select  0 0:00   0.20% httpd
30835 www1  200   326M 31636K select  5 0:00   0.10% httpd
-
30831 www1  200   326M 31932K select  7 0:00   0.29% httpd
30830 www1  200   330M 35900K select  0 0:00   0.20% httpd
30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
-
30831 www1  200   326M 31932K select  7 0:00   0.20% httpd
30830 www1  200   330M 35900K select  0 0:00   0.10% httpd
30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
-
30831 www1  200   326M 31932K select  7 0:00   0.10% httpd
30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
-
30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
30831 www1  200   326M 31932K select  7 0:00   0.00% httpd
30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
-
30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
30831 www1  200   326M 31932K select  7 0:00   0.00% httpd
30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
-
-
-

and then no www user is activae any more...  Note: the test machine is only
used by myself.

Regards, Norbert



On 09/13/17 13:08, Yann Ylavic wrote:

On Wed, Sep 13, 2017 at 10:10 AM, Norbert 
wr

Re: [users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Yann Ylavic
Hi Norbert,

can we keep the users@ mailing list CC-ed on this since it may be
relevant for others too?
Moreover people with a better knowledge of mod_perl than me could chime in...

On Wed, Sep 13, 2017 at 1:33 PM, Norbert  wrote:
>
> thanks - but it does not help -

The case seems to be mod_perl specific (I know very few about it),
"normally" preforked processes have the lifetime given by these
directives...

Could it be a crash of children processes somehow, or a special
handling of processes in mod_perl?
The creation of multiple root processes at startup looks special to
me, usually httpd has a single root process to maintain children
(www:www) processes, is a root process still alive after the load?


For others on the list, your results below:

> have a look, I use top in 1 second intervals
> and extracted the httpd processes which have the user www.
> The minus represent the 1 second gap:
>
> -
> -
> 30830 www1  240   326M 31884K select  0 0:00   0.00% httpd
> 30832 www1  270   326M 31636K select  4 0:00   0.00% httpd
> 30833 www1  270   326M 31636K select  5 0:00   0.00% httpd
> 30834 www1  270   326M 31636K select  1 0:00   0.00% httpd
> 30831 www1  270   326M 31644K select  6 0:00   0.00% httpd
> 30835 www1  270   326M 31632K select  0 0:00   0.00% httpd
> -
> 30830 www1  240   326M 31884K select  0 0:00   0.49% httpd
> 30832 www1  270   326M 31636K select  4 0:00   0.49% httpd
> 30833 www1  270   326M 31636K select  5 0:00   0.49% httpd
> 30834 www1  270   326M 31636K select  1 0:00   0.49% httpd
> 30831 www1  270   326M 31644K select  6 0:00   0.49% httpd
> 30835 www1  270   326M 31632K select  0 0:00   0.49% httpd
> -
> 30830 www1  210   326M 31928K select  3 0:00   0.39% httpd
> 30832 www1  270   326M 31636K select  4 0:00   0.39% httpd
> 30833 www1  270   326M 31636K select  5 0:00   0.39% httpd
> 30834 www1  270   326M 31636K select  1 0:00   0.39% httpd
> 30831 www1  270   326M 31644K select  6 0:00   0.39% httpd
> 30835 www1  270   326M 31632K select  0 0:00   0.39% httpd
> -
> 30830 www1  210   330M 35880K select  3 0:00   0.59% httpd
> 30832 www1  270   326M 31636K select  4 0:00   0.29% httpd
> 30833 www1  270   326M 31636K select  5 0:00   0.29% httpd
> 30834 www1  270   326M 31636K select  1 0:00   0.29% httpd
> 30831 www1  270   326M 31644K select  6 0:00   0.29% httpd
> 30835 www1  270   326M 31632K select  0 0:00   0.29% httpd
> -
> 30830 www1  210   330M 35880K select  3 0:00   0.49% httpd
> 30832 www1  270   326M 31636K select  4 0:00   0.20% httpd
> 30833 www1  270   326M 31636K select  5 0:00   0.20% httpd
> 30834 www1  270   326M 31636K select  1 0:00   0.20% httpd
> 30831 www1  270   326M 31644K select  6 0:00   0.20% httpd
> 30835 www1  270   326M 31632K select  0 0:00   0.20% httpd
> -
> 30830 www1  210   330M 35900K select  4 0:00   0.39% httpd
> 30831 www1  200   326M 31652K select  4 0:00   0.20% httpd
> 30835 www1  200   326M 31636K select  6 0:00   0.10% httpd
> -
> 30830 www1  200   330M 35900K select  1 0:00   0.29% httpd
> 30831 www1  200   326M 31876K select  0 0:00   0.20% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.10% httpd
> -
> 30831 www1  200   326M 31932K select  7 0:00   0.29% httpd
> 30830 www1  200   330M 35900K select  0 0:00   0.20% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
> -
> 30831 www1  200   326M 31932K select  7 0:00   0.20% httpd
> 30830 www1  200   330M 35900K select  0 0:00   0.10% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
> -
> 30831 www1  200   326M 31932K select  7 0:00   0.10% httpd
> 30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
> -
> 30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
> 30831 www1  200   326M 31932K select  7 0:00   0.00% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
> -
> 30830 www1  200   330M 35900K select  0 0:00   0.00% httpd
> 30831 www1  200   326M 31932K select  7 0:00   0.00% httpd
> 30835 www1  200   326M 31636K select  5 0:00   0.00% httpd
> -
> -
> -
>
> and then no www user is activae any more...  Note: the test machine is only
> used by myself.

Re: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Hemant Chaudhary
Yes true. I want to start only one process and it should not spawn child
processes.
In apache, we have master process and then it spawns child. After that
child serves requests by client.
My aim is to start master process and it should not spawn child as well as
it should serve requests from client.

Thanks
Hemant

On Wed, Sep 13, 2017 at 5:18 PM, Bremser, Kurt (Allianz Technology GmbH) <
kurt.brem...@allianz.at> wrote:

> In most cases, you can only have ONE process binding to ONE
> IP-address/port combination. Children of this process will then inherit the
> socket, which is the way how apache works.
>
> On Linux and BSD, there is the SO_REUSEPORT option that can be set by a
> listening process, so that other processes can also bind to the socket, and
> let the OS handle which incoming data ends up where.
> If you think about that, it opens the port up for hijacking, as the
> initial listener process has no idea which other processes might also bind
> to the port and intercept traffic.
>
> So the apache method of one master process binding to the port and
> spawning children is the prudent one.
>
> Kurt Bremser
> Allianz Technology GmbH
>
> Newton was wrong. There is no gravity. The Earth sucks.
> 
> Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
> Gesendet: Mittwoch, 13. September 2017 13:29
> An: users@httpd.apache.org
> Betreff: Re: [users@httpd] Run apache without master [wd-vc]
>
> Hi
>
> I want to create different processes not forking from parent or anywhere.
> It is still okay if parent process is started and parent process will not
> fork child processes but parent should serve requests.
>
> On Sep 13, 2017 4:47 PM, "Eric Covener" mailto:cove
> n...@gmail.com>> wrote:
> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
> mailto:hemantdude.chaudh...@gmail.com>>
> wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org unsubscr...@httpd.apache.org>
> For additional commands, e-mail: users-h...@httpd.apache.org users-h...@httpd.apache.org>
>
>
> Allianz Technology GmbH
> 1130 Wien, Hietzinger Kai 101-105
> FN 365014k, Handelsgericht Wien
> UID: ATU 66614737
>
> http://www.allianz.at
>
> 
> Dieses E-Mail und allfaellig daran angeschlossene Anhaenge
> enthalten Informationen, die vertraulich und
> ausschliesslich fuer den (die) bezeichneten Adressaten
> bestimmt sind.
> Wenn Sie nicht der genannte Adressat sind, darf dieses
> E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen
> Personen zugaenglich gemacht noch in anderer Weise
> verwertet werden.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
> wir Sie, dieses E-Mail und saemtliche angeschlossene
> Anhaenge zu loeschen.
>
> Please note: This email and any files transmitted with it is
> intended only for the named recipients and may contain
> confidential and/or privileged information. If you are not the
> intended recipient, please do not read, copy, use or disclose
> the contents of this communication to others and notify the
> sender immediately. Then please delete the email and any
> copies of it. Thank you.
>
> 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


AW: [users@httpd] Run apache without master [wd-vc]

2017-09-13 Thread Bremser, Kurt (Allianz Technology GmbH)
In most cases, you can only have ONE process binding to ONE IP-address/port 
combination. Children of this process will then inherit the socket, which is 
the way how apache works.

On Linux and BSD, there is the SO_REUSEPORT option that can be set by a 
listening process, so that other processes can also bind to the socket, and let 
the OS handle which incoming data ends up where.
If you think about that, it opens the port up for hijacking, as the initial 
listener process has no idea which other processes might also bind to the port 
and intercept traffic.

So the apache method of one master process binding to the port and spawning 
children is the prudent one.

Kurt Bremser
Allianz Technology GmbH

Newton was wrong. There is no gravity. The Earth sucks.

Von: Hemant Chaudhary [hemantdude.chaudh...@gmail.com]
Gesendet: Mittwoch, 13. September 2017 13:29
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Run apache without master [wd-vc]

Hi

I want to create different processes not forking from parent or anywhere.
It is still okay if parent process is started and parent process will not fork 
child processes but parent should serve requests.

On Sep 13, 2017 4:47 PM, "Eric Covener" 
mailto:cove...@gmail.com>> wrote:
On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
mailto:hemantdude.chaudh...@gmail.com>> wrote:
> Hi,
>
> I want to start my apache without master process means when I will give
> "httpd" command, it should start 5 worker process which has access to
> httpd.conf as well as serve requests.
>
> Is it possible to achieve this ? If yes, then how should to achieve this ?

Not really. Why not just ignore the parent process? The worst thing
that can happen is that it doesn't manage the children, which you're
already losing in this hypothetical setup.

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org
For additional commands, e-mail: 
users-h...@httpd.apache.org


Allianz Technology GmbH 
1130 Wien, Hietzinger Kai 101-105 
FN 365014k, Handelsgericht Wien 
UID: ATU 66614737 

http://www.allianz.at 

 
Dieses E-Mail und allfaellig daran angeschlossene Anhaenge 
enthalten Informationen, die vertraulich und 
ausschliesslich fuer den (die) bezeichneten Adressaten 
bestimmt sind. 
Wenn Sie nicht der genannte Adressat sind, darf dieses 
E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen 
Personen zugaenglich gemacht noch in anderer Weise 
verwertet werden.
Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
wir Sie, dieses E-Mail und saemtliche angeschlossene
Anhaenge zu loeschen. 

Please note: This email and any files transmitted with it is 
intended only for the named recipients and may contain 
confidential and/or privileged information. If you are not the 
intended recipient, please do not read, copy, use or disclose 
the contents of this communication to others and notify the 
sender immediately. Then please delete the email and any 
copies of it. Thank you.



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Run apache without master

2017-09-13 Thread Hemant Chaudhary
Hi

I want to create different processes not forking from parent or anywhere.
It is still okay if parent process is started and parent process will not
fork child processes but parent should serve requests.

On Sep 13, 2017 4:47 PM, "Eric Covener"  wrote:

> On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
>  wrote:
> > Hi,
> >
> > I want to start my apache without master process means when I will give
> > "httpd" command, it should start 5 worker process which has access to
> > httpd.conf as well as serve requests.
> >
> > Is it possible to achieve this ? If yes, then how should to achieve this
> ?
>
> Not really. Why not just ignore the parent process? The worst thing
> that can happen is that it doesn't manage the children, which you're
> already losing in this hypothetical setup.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Run apache without master

2017-09-13 Thread Eric Covener
On Wed, Sep 13, 2017 at 7:09 AM, Hemant Chaudhary
 wrote:
> Hi,
>
> I want to start my apache without master process means when I will give
> "httpd" command, it should start 5 worker process which has access to
> httpd.conf as well as serve requests.
>
> Is it possible to achieve this ? If yes, then how should to achieve this ?

Not really. Why not just ignore the parent process? The worst thing
that can happen is that it doesn't manage the children, which you're
already losing in this hypothetical setup.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Run apache without master

2017-09-13 Thread Hemant Chaudhary
Hi,

I want to start my apache without master process means when I will give
"httpd" command, it should start 5 worker process which has access to
httpd.conf as well as serve requests.

Is it possible to achieve this ? If yes, then how should to achieve this ?

Thanks
hemant


Re: [users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Yann Ylavic
On Wed, Sep 13, 2017 at 10:10 AM, Norbert  wrote:
> Thanks, I set (on my testmachine):
>
> 
> MinSpareServers 4
> MaxSpareServers 4
> MaxConnectionsPerChild 10
> 
>
> but nothing changes -  the httpd processes with user www:www appear and
> disappear in top after seconds...

We the above, there should be at least 4 processes that don't
disappear before 10 handling
10 connections.

But if more/other processes are created because of the load, they
would be recycled as soon as the load decreases.


What do you observe with the below ?


StartServers4
ServerLimit 80
MinSpareServers 4
MaxSpareServers 40
MaxRequestWorkers   80
MaxConnectionsPerChild  0



Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] mod_evasive whitelist question

2017-09-13 Thread Matthew Jones
Hi all

I'm trying to whitelist 10.* addresses so that they¹re not caught by
mod_evasive. I¹ve added the 10.*.*.* range to a DOS whitelist directive in
evasive.conf but it¹s still blocking various 10.* IPs.

Here¹re the contents of evasive.conf:



DOSHashTableSize9239
DOSPageCount5
DOSSiteCount32
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod   60
DOSLogDir   "/var/log/mod_evasive"
DOSEmailNotify  
DOSWhitelist161.112.232.37
DOSWhitelist161.112.232.102
DOSWhitelist161.112.232.103
DOSWhitelist161.112.232.111
DOSWhitelist161.112.232.117
DOSWhitelist161.112.232.221
DOSWhitelist161.112.232.168
DOSWhitelist172.17.193.*
DOSWhitelist172.17.194.*
DOSWhitelist172.17.195.*
DOSWhitelist172.20.*.*
DOSWhitelist172.22.*.*
DOSWhitelist10.*.*.*



I¹m sorry for the noddy question, but what have I done wrong here? All the
documentation I¹ve found says that you can use multiple DOSWhitelist
directives, with wildacrds used on up to the last 3 octets.


I¹m running Apache2.4 on Ubuntu 14.04, please let me know if any other
information would be helpful.

Thanks in advance for your valueable time.

--
Matt Jones

Senior Network Systems Specialist
x3967
@huddsweb



University of Huddersfield inspiring tomorrow's professionals.
[http://marketing.hud.ac.uk/_HOSTED/EmailSig2014/EmailSigFooter.jpg]

This transmission is confidential and may be legally privileged. If you receive 
it in error, please notify us immediately by e-mail and remove it from your 
system. If the content of this e-mail does not relate to the business of the 
University of Huddersfield, then we do not endorse it and will accept no 
liability.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Yann Ylavic
On Wed, Sep 13, 2017 at 9:56 AM, Yann Ylavic  wrote:
>
> Please have a look at http://httpd.apache.org/docs/2.4/fr/mod/prefork.html.

Sorry, http://httpd.apache.org/docs/2.4/mod/prefork.html or
http://httpd.apache.org/docs/2.4/de/mod/prefork.html might be more
appropriate...

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Yann Ylavic
Hi,

On Wed, Sep 13, 2017 at 9:11 AM, Norbert  wrote:
>
> So: I am running apache 2.4 (on FreeBSD 11), use mod_perl and prefork.  When
> the server starts it creates several httpd processes all running under root.
> This is ok.  When a request arrives it creates subprocesses with the user
> www:www (80:80) - everything ok.  But now the question: why are the
> processes with www:www user terminated after a short time / request?
> Meaning: if I wait a short time, the mod_perl modules have allways been
> "reinitailized", as far as I can so from my debugging output. Is there a way
> to keep a fixed number of processes under www:www running - at least for
> hours?  I hope I could explain...

Please have a look at http://httpd.apache.org/docs/2.4/fr/mod/prefork.html.

The relevant directives are MinSpareServers and MaxSpareServers for
the number of running processes, and MaxConnectionsPerChild for their
lifetime.


Regards,
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Question about apache2.4, prefork and mod_perl

2017-09-13 Thread Norbert

Hello,

I hope this request is not stupid, but I did not find anything which 
gives me an answer...


So: I am running apache 2.4 (on FreeBSD 11), use mod_perl and prefork.  
When the server starts it creates several httpd processes all running 
under root.  This is ok.  When a request arrives it creates subprocesses 
with the user www:www (80:80) - everything ok.  But now the question: 
why are the processes with www:www user terminated after a short time / 
request?  Meaning: if I wait a short time, the mod_perl modules have 
allways been "reinitailized", as far as I can so from my debugging 
output. Is there a way to keep a fixed number of processes under www:www 
running - at least for hours?  I hope I could explain...


the neccessary part of my httpd.conf is:

...
LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so
...

User www
Group www

...
PerlRequire /path/to/startup.pl
PerlModule ModPerl::PerlRun
PerlModule ModPerl::Registry
...

thanks for help!  Norbert



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org