Virtual Domains
Igor Sysoev
is at rambler-co.ru
Thu Sep 4 08:28:23 MSD 2008
On Wed, Sep 03, 2008 at 10:49:47PM +0000, David wrote:
> I have 5 sites that will all be sharing the same IP, and 2 that will have their
> own IP addresses.
>
> I have a series of conf files that I include that contain server {} sections.
> Each conf looks like this:
>
> server {
> listen xxx.xxx.xxx.xxx;
> server_name domain.com www.domain.com;
> access_log /var/log/nginx/domain.access.log main;
>
> location / {
> index index.php index.html;
> root /home/domain/public_html/domain;
> }
>
> }
>
> For the sites with unique IP addresses I have put their unique IP address in the
> listen statement.
>
> For the sites that are sharing an IP address I have put the same IP address in
> each domains conf file for the listen statement.
>
> Is this setup correctly ?
Yes.
> Additionally, for a site that receives 700K PVs/month on a Dual 2.8Ghz Xeon 4Gb
> RAM with pretty heavy MySQL usage, how many workers should I be starting would
> you think ? I have something in the region of 500 users loading pages every 15
> minutes.
Usually one worker is enough.
If you use gzipping in nginx side, then try 2 workers (for each CPU).
If you have large files, those are not cached ib OS VM,
you probably need 10-20 workers.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list