upstream with vps

mdwalter nginx-forum at nginx.us
Mon Feb 11 01:06:24 UTC 2013


Hello guy, I'm sorry for my english
So I have 4 vps:
1. 4gb ram 1 processor 1 ipv4
2. 2gb ram 4 processors 3 ipv4 + 3 ipv6
3. 1gb ram 4 processors 3 ipv4 + 3 ipv6 
4. 1gb ram 4 processors 3 ipv4 + 3 ipv6


I thought this configuration:
vps 1 with nginx and fastcgi php 5.4 
vps 2 with nginx for upstream and with mysql 5.5 with replicator
vps 3 with nginx and fastcgi php 5.4
vps 4 with nginx and mysql 5.5 and replicator

the first thing I wanted to tell you if the vps can hold 500/1000 visitors a
day with a dozen domains

vps 2 use it for upstream because it has 3 ipv4 available. 
We see the configuration of ngnix.conf:

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream backend {
server 79.xxx.190:80; <-- This is vps1
server 199.xxx.72.100:80; <-- this is vps2 (same vps of this file)

} 
} 

Now setup for one domain:

server {
listen 199.xxx.72.100;
root /usr/share/nginx/computereconomy.com;
index index.html index.htm;
server_name computereconomy.com;
location / {
try_files $uri $uri/ /index.html;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
gzip on;
ssi on;
ssi_silent_errors off;
}


you think you can use a VPS to the upstream and viewing the site?
or is there something I should do more or less?
the vps1 is a normal setup (nginx) or should I configure it differently? if
so, how?

Thanx!!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236068,236068#msg-236068



More information about the nginx mailing list