You are here: Re: File permissions for a wiki-like site « PHP Programming Language « IT news, forums, messages
Re: File permissions for a wiki-like site

Posted by The Natural Philosopher on 09/21/07 12:32

Jerry Stuckle wrote:
> The Natural Philosopher wrote:
>> Jerry Stuckle wrote:
>>
>>>> You cannot, for example, have multiple instances of Apache listening on
>>>> port 80 of a single IP address, and I thought assigning 255 IP
>>>> addresses
>>>> to a single web server went out with browsers that don't understand
>>>> HTTP/1.1 and the Host: header.
>>>>
>>>
>>> I didn't say anything about multiple instances on port 80, did I?
>>>
>>
>> Actually you can, and often do, have multiple instances of Apache
>> (effectively) listening on port 80..
>>
>> That's how virtual hosting and load balancing works.
>
> No. You can only have one instance of Apache running on port 80 on a
> single machine.
>
> Virtual hosting works because that one instance has several hosts
> defined. But it is still only one instance.
>
> Load balancing works because the instances of Apache are on different
> systems.
>

Semantics.

You can chain more listeners than one to a single port. At what point
that becomes 'more than one instance tied to a port' as against 'one OS
routine vectoring calls to multiple processes' is a moot one.

My process list for apache shows this:-

ps -eadf| grep apache
root 9310 1 0 Jul16 ? 00:00:00 /usr/sbin/apache
www-data 22302 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22303 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22304 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22305 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22306 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22807 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 22892 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 23339 9310 0 Sep16 ? 00:00:00 /usr/sbin/apache
www-data 23417 9310 0 Sep17 ? 00:00:00 /usr/sbin/apache
www-data 23418 9310 0 Sep17 ? 00:00:00 /usr/sbin/apache

i.e 10 instances of apache on ONE server instance are running. Plus the
original spawner. This is on an IDLE web server..the spare processes are
there to add load capacity without the overhead of a fork().

It is perfectly possible for more than one process to bind() to the same
socket, provided that the socket options are set up that way. The only
proviso being that the processes understand each other and work
co-operatively. In essence its no more complex than e.g sharing a
hardaware interrupt: All processes that are attached to that interrupt
wake up, and one of them decides 'its mine' and takes it whilst the
others go back to sleep..



I am fairly sure apache does this routinely as above:

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация