upstream nodes {
server 127.0.0.1:7101;
server 127.0.0.1:7103;
}
upstream nodes {
ip_hash;
server 127.0.0.1:7101;
server 127.0.0.1:7102;
server 127.0.0.1:7103;
server 127.0.0.1:7104;
server 127.0.0.1:7105;
server 127.0.0.1:7106;
server 127.0.0.1:7107;
server 127.0.0.1:7108;
}
server {
listen 80; #Порт джинсы
server_name cp.csgo-forecast.com;
access_log off;
error_log /var/log/nginx/error.log;
root /mnt/sdb1/mydomain/admin/www; #путь до проекта
location / {
try_files $uri @nodes;
}
location ~* \.(jpg|jpeg|gif|png|webp|ico|css|bmp|swf|js|html|txt|ejs)$ {
root /mnt/sdb1/mydomain/admin/www;
expires max;
}
location @nodes {
proxy_pass http://nodes;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
$('form').on('submit', function (e) {
e.preventDefault();
var form = $(this),
data = {
param: 'param',
param2: 'param2'
};
$.ajax({
url: "api.php",
type:"GET",
data: data,
dataType:"html",
beforeSend:funcBeforeinfoNewItemsProdaj,
success: funcSuccessinfoNewItemsProdaj
});
});