форум vBSupport.ru > В помощь веб-мастеру > Общие вопросы сайтостроения > Системное администрирование
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Drelatus
Продвинутый
Default Помогите рассчитать настройки сервера
0

Есть VPS/VDS сервер:
CPU 1500Mhz
RAM память: 512 Мб

Стоит связка nginx+апач
Вот некоторые настройки:

Конфиги(основное):
httpd.conf
Code:
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule worker.c>
StartServers 3
MaxClients 64
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 8000
</IfModule>

nginx.conf
Code:
user nginx;
worker_processes  4;
worker_rlimit_nofile 80000;

error_log   /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections  8000;
    use epoll;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    server_tokens   off;
    gzip            on;
    gzip_static     on;
    gzip_comp_level 5;
    gzip_min_length 1024;
    keepalive_timeout  65;
    limit_req_zone  $binary_remote_addr  zone=one:3m   rate=4r/s;
    include /etc/nginx/conf.d/*.conf;

	client_max_body_size 16m;
	log_format  isp '$bytes_sent $request_length';
	server {
		listen 93.183.203.48:80;
		server_name drelatus.net www.drelatus.net;
		rewrite ^(/manager/.*)$	https://$host$1	permanent;
		error_page 404 = @fallback;
		location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
			proxy_pass  http://127.0.0.1:8081;
			proxy_redirect off;
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Real-IP $remote_addr;
		}
		location / {
			limit_req   zone=one  burst=10;
			proxy_pass  http://127.0.0.1:8081;
			proxy_redirect off;
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Real-IP $remote_addr;
		}
		location ~* ^.+\.(jpg|jpeg|gif|png|svg|css|mp3|ogg|mpe?g|avi|zip|bz2?|rar)$ {
			root /var/www/pia3333/data/www/drelatus.net;
			#limit_req   zone=one  burst=10;
		}
		location @fallback {
			#limit_req   zone=one  burst=10;
			proxy_pass  http://127.0.0.1:8081;
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Real-IP $remote_addr;
		}
		location ~ /\.ht {
		deny  all;
		}
}
	}
Помогите настоить на сдерживание "школоло" ддоса. Но и не потярять сайт из поисковиков. Нужна помощь в составлении привил IPTABLES.

Сейчас стоит сервер с 768 мб памяти и ISP LITE, но для маленького форума это много. Хочу убрать панель и уменьшить оперативки до 512 мб. Главное, чтобы форум не лёг от http флуда с 2-4 компьютеров... Если у вас есть время, то пожалуйста добавьтесь в скайп pia_3333

Last edited by Drelatus : 04-07-2012 at 02:39 PM.
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 04:44 PM.


Powered by vBulletin® Version 3.5.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...