Community Page
- blog.kovyrin.net Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- nice article! nice site. you're in my rss feed now ;-) keep it up
- nice article! nice site. you're in my rss feed now ;-) keep it up
- nice article! nice site. you're in my rss feed now ;-) keep it up
- Top post. Thank you very much. :-)
- Thanks for the info. May God have mercy on us all.
Jump to original thread »
Two weeks ago we have started new version of one of our primary web projects and have started very massive advertisement campaign to promote this web site. As the result of that advertisements, our outgoing traffic has been increased to 200-250Mbit/s from only one server! In this article I wil
... Continue reading »
9 months ago
9 months ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
Возникла ситуация:
есть один тяжёлый проект
бежит это на nginx
добавили несколько дополнительных серверов с FastCGI
происходит потеря сессий :( как с этим бороться?
Заранее благодарен за ответ.
2 years ago
1) хранение сессий на nfs-share
2) хранение сессий в базе данных
2 years ago
I'm reverse proxying to an Apache server...when I run a script that takes a lil' while to produce some input (e.g. an Amazon product fetching script) nginx will sometimes not present the output, even though the Apache script is still churning away in the background. What timeout setting do I need to adjust in this situation?
2 years ago
2 years ago
Расскажите плз чем вы такие красивые блок схемы строите?
2 years ago
у нас на сервере крутятся два сайта.
скажем, q5Video.ru и q5Magazine.ru
в конфиге nginx я прописываю код:
server {
listen 81.17х.х.хх:80;
server_name q5Magazine.ru www.q5Magazine.ru;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# Static files location
location ~* ^.+.(midi|wav|flv|bmp|rtf|js)$ {
root /spool/www/members_ng;
}
и в кофиге апача прописываю
listen 127.0.0.1:8080
что здесь неправильно?
2 years ago
Would my setup be less effective under heavy load conditions?
2 years ago
2 years ago
I am under the impression that a time consuming 200MB request proxied through Apache to nginx will not keep one of Apache's large child processes busy that could be better used to process dynamic content. While nginx serves the static file, Apache is free to handle it's dynamic files. Please correct me if I'm wrong!
2 years ago
The configuration like:
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
who can help me this
2 years ago
А в конфиге nginx есть возможность построить условия (анализ HTTP-заголовков), на которых уже решать, что сделать с запросом, проксировать его апачу, или выдать 403?
2 years ago
2 years ago
use nginx as frontend
use two tomcats as backend web servers
location /
proxy_pass
http://127.0.0.1:8080/;
http://127.0.0.1:9000/;
listen 80
2 years ago
Как быть в этой ситуации ?
Спасибо !
2 years ago
У меня на серваке 8 виртуальных хостов, с которых раздаётся контент(музыка, кино и т.д.) Хотел при помощи нгинкс разгрузить апач, который временами виснет из-за огромного (около 2000) количества процессов. Перевесил каждый виртуальный хост на 127.0.0.1 на разные порты. Настроил нгинкс по Вашему примеру.
После запуска смог зайти более менее быстро только на один сайт. Побродить по нему и тем более что-то качнуть не удалось.((
Помогите разобраться в чём причина таких тормозов и как ускорить систему.
Система
Intel(R) Pentium(R) 4 CPU 2.40GHz
Память - 2 Гб
Ось -Fedora Core 5 - 2.6.20-1.2320.fc5
Apache - 2.2.2
Nginx - 0.5.26
Конфиг полностью совпадает с Вашим, за исключением папки root, конечно )
Жду ответа...
2 years ago
2 years ago
Is't possible to configure it to use DNS resolution for the backend servers?
I would like to have Nginx to relay http/https for many services on different servers in the backend, but not having to add seperate sections for each server/service.
Or will I lose something by doing that "if possible"?
1 year ago
Why wouldn't you have Nginx as the front and the backend server?
Is there any disadvantage to using Nginx for the dynamic content as well?
1 year ago
у меня крутится около полутора десятков виртуальных хостов через nginx и apache.
Nginx сидит на 80-м порту, apache - на 8080. Никаких проблем, всё отлично.
Очень большие тормоза были при первом заходе на сайт (после установки nginx как frontend) - сайт открывался больше двух минут. Но как только он открылся, всё стало работать очень шустро и быстро и до сих пор радует меня скоростью.
Конфиг - примерно такой же, как в статье, единственное, proxy_redirect использую.
Так что Вы, скорее всего, просто не до конца разобрались в конфигурации - советую обратиться к первоисточникам, и не использовать чужие конфиги.
1 year ago
А ктонибудь делал связку nginx + java?
1 year ago
у меня была такая же ситуация. очень большой iowait.. оказалось что нагрузка сильно растет если отдавать файлы из пхп скриптов fopen, fread.. как только переделал XAccel нагрузка резко упала и использование нгинх оправдалось.
1 year ago
У меня такой вопросик ...
Есть сайты на MS SharePoint`е в которих забиты внутрение адреса типа http://serv1.localnet/.
И есть сервак на FreeBSD с выходом в инет, который имеет свой адрес http://some.host.net/.
Возможно ли настроить nginx на замену адресов с http://serv1.localnet/ на http://some.host.net/ в страничках, и будет ли это так работать ?
1 year ago
anyone ever configured nginx with haproxy? i would like to use nginx to serve static content and have haproxy load-balancing my mongrels serving 3 clusters. so that nginx gets request (serves if static) if not goes to HA for a proxy to the backend mongrel server.
1 year ago
1 year ago
1 year ago
is the reporting of visitors statistics.
Where will you take that information from? From the first (frontend)
web server? or from the servers behind it? What information will be
given? Will all the reports look like if the only visitor was the
reverse proxy server?
1 year ago
1 year ago
А есть способ сделать так, чтобы nginx вместо того, чтобы обслуживать:
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root /spool/www/members_ng;
}
обслуживал все файлы, кроме .jsp и случая когде не указано расширение. Т.е. запрос к папке идёт.
Ну и папку /WEB-INF заоодно закрыть :-)
1 year ago
Таким образом, после редиректа, получится, что $HTTP_SERVER_VARS[PORT] = 8080, но это пол беды, т.к. это мало кому важно, гораздо страшнее следующая проблема:
При проксировании SSL мы получаем SERVER ENVIRONMENT
HTTPS = null
и
SERVER_PORT = 8080
При редиректе на какой-нибудь пеймент метод(не на все, но такое бывает), кастомер отредиректиться обратно(после проверки кредитки) на порт 8080. Плюс Corner of Trust и подобные штуки для верификации SSL-сертификата, внушающие доверие покупателям тоже могут не работать... :)
Решается такая проблема магическим RewriteRule'ом:
RewriteEngine on
RewriteCond %{HTTP:SSL} YES
RewriteRule .* - [E=HTTPS:on,L]
RewriteRule .* - [E=SERVER_PORT:443,L]
good luck :)
1 year ago
1 year ago
> haproxy?
www.nginxhosting.com
1 year ago
когда пишу
Listen 127.0.0.1:80
то он выдает ошибку
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
что делать?
1 year ago
nginx, слушает somehost:6969
бэкэнд, на который перекидываются запросы
proxy_pass http://127.0.0.1:4850;
суть проблемы, бэкэнд посылает Location: /welcome, однако Proxy его перезаписывает как somehost/welcome, при этом теряется порт (6969)
собственно, что надо сделать с proxy_redirect, чтобы либо он оставался относительным, либо не терялся номер порта?
заранее спасибо
1 year ago
Since, 70-80% of my sites are PHP based this practically dismisses nginx for me.
Or I am doing something wrong?
1 year ago
location / {
proxy_pass http://localhost:8888/
....
....
}
1 year ago
Попробуй обработать 504 ошибку в nginx ;)
11 months ago
Для полноты автору следовало бы описать и настройку Apache чтобы он не конкурировал с nginx, и нормально ловил подачи nginx
11 months ago
9 months ago
I used nginx load balancers and nginx as reverse proxy.
Here's the structures
nginx (lb) -> nginx (reverse proxy) -> lighttpd
On nginx reverse proxy, I already got nginx (lb) Ips.
How can I get the remote host address on nginx?
8 months ago