Re: Nginx virtual host configuration

From: Ish Sookun <ish.sookun_at_lsldigital.mu>
Date: Mon, 28 Sep 2015 22:58:29 +0400

Hi SM,

On 09/28/2015 09:09 PM, S Moonesamy wrote:
>
> There is the following: "A lot of people, including me, use Nginx as a
> web server thanks to its event based multi-protocol support." in the
> article at http://hacklog.mu/nginx-virtual-host-configuration/ I could
> not understand the "event based muti-protocol support". What do you
> mean by that?
>

Thank you for the question.

Maybe I mixed up two things that appear like one. Say you have the
http{} block with one server{} block and two location{} sub-contexts. It
looks as follows:

http {

   # some directives here

   server {
     listen 80;
     server_name www.yoursite.mu;

     location / {
     # some items here
     proxy_pass http://IP_Address:Port_Number;
     }

     location ~ \.(gif|jpe?g|png)$ {
     root /var/www/images/;
     }

   }
}

When Nginx receives an HTTP request, it is passed through the http{}
context and served according to the conditions met. The Nginx
configuration can also hold an IMAP context where the requests will be
served accordingly.

mail {

   # some directives here

   server {
     listen 143;
     protocol imap;
   }
}

Nginx has several worker processes that listen for events (incoming
connections). Actions are initiated according to these events. Several
protocols like HTTP, IMAP, SMTP etc, are supported.

With "event based multi-protocol support", I somehow summarized the
above configuration; though to run a "webserver" I only need Nginx to
listen for HTTP.

> Last April, a person from "expat blog" commented that the web site
> receives three million visits a month. From a technical perspective the
> number is not impressive.
>

That's approximately 100,000 visits per day. The number is indeed not
impressive.

Regards,

-- 
Ish Sookun
Received on Mon Sep 28 2015 - 18:58:48 PST

This archive was generated by hypermail 2.3.0 : Mon Sep 28 2015 - 19:00:02 PST