Просьба разбирающихся в серверах помочь с настройкой Nginx на isp manager. Сервер: Linux SSD VPS.
В данный момент у меня следующая настройка конфигурации:
В данный момент у меня следующая настройка конфигурации:
Цитата |
---|
user apache;
worker_processes 1; timer_resolution 100ms; worker_rlimit_nofile 8192; worker_priority -5; pid /var/run/nginx.pid; events { use epoll; worker_connections 4096; multi_accept on; } 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 off; error_log /var/log/nginx/error.log crit; sendfile on; server_tokens off; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; tcp_nodelay on; tcp_nopush on; keepalive_timeout 30; keepalive_requests 100; gzip_static on; gzip on; gzip_comp_level 5; gzip_types application/x-javascript application/javascript text/css image/jpeg image/png; open_file_cache max=200000 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 2; open_file_cache_errors on; aio on; directio 1m; output_buffers 8 256k; server_names_hash_bucket_size 128; include /etc/nginx/conf.d/*.conf; client_max_body_size 96M; log_format isp '$bytes_sent $request_length'; server { server_name freshkino.org www.сайт.org; location ~* ^.+\.(html|ico|apk|7z|gz|md5|txt|jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { expires max; root $root_path; access_log /var/www/nginx-logs/fk2 isp; access_log /var/www/httpd-logs/сайт.org.access.log ; error_page 404 = @fallback; } location / { proxy_pass http://37.1.201.111:81; proxy_redirect http://37.1.201.111:81/ /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ { proxy_pass http://37.1.201.111:81; proxy_redirect http://37.1.201.111:81/ /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } location @fallback { proxy_pass http://37.1.201.111:81; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } location ^~ /webstat/ { auth_basic "Restricted area"; auth_basic_user_file /var/www/fk2/data/etc/910.passwd; try_files $uri @fallback; } include /usr/local/ispmgr/etc/nginx.inc; listen 37.1.201.111; charset CP1251; index index.php; set $root_path /var/www/fk2/data/www/сайт.org; } |
Изменено:
Андрей - 30 Сентября 2015 20:15