Jump to content

Ivan91

Members
  • Content Count

    5
  • Joined

  • Last visited

    Never

About Ivan91

  • Rank
    Newbie

Contact Methods

  • ICQ
    447071120
  1. ############################################################ ########### # # This is the main Nginx configuration file. # # More information about the configuration options is available on # * the English wiki - http://wiki.nginx.org/Main # * the Russian documentation - http://sysoev.ru/nginx/ # ############################################################ ########### #----------------------------------------------------------- ----------- # Main Module - directives that cover basic functionality # # http://wiki.nginx.org/NginxHttpMainModule # #----------------------------------------------------------- ----------- user nginx; worker_processes 8; worker_rlimit_nofile 131072; worker_priority -5; 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 Module # # http://wiki.nginx.org/NginxHttpEventsModule # #----------------------------------------------------------- ----------- events { worker_connections 10240; } #----------------------------------------------------------- ----------- # HTTP Core Module # # http://wiki.nginx.org/NginxHttpCoreModule # #----------------------------------------------------------- ----------- 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; #keepalive_timeout 0; # keepalive_timeout 65; #gzip on; # # The default server # server_names_hash_bucket_size 10009; sendfile on; keepalive_timeout 10; tcp_nodelay on; tcp_nopush on; client_header_timeout 1m; client_body_timeout 3m; send_timeout 2m; client_body_buffer_size 256k; client_max_body_size 50m; fastcgi_connect_timeout 45s; fastcgi_send_timeout 90s; fastcgi_read_timeout 90s; fastcgi_buffer_size 32k; fastcgi_buffers 4 32k; fastcgi_busy_buffers_size 32k; fastcgi_temp_file_write_size 32k; fastcgi_hide_header x-powered-by; fastcgi_intercept_errors on; gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_min_length 1100; gzip_buffers 64 8k; gzip_comp_level 8; gzip_http_version 1.1; gzip_proxied any; gzip_types text/plain application/xml application/x-javascript text/css; connection_pool_size 256; client_header_buffer_size 1k; large_client_header_buffers 4 2k; request_pool_size 4k; # Load config files from the /etc/nginx/conf.d directory include /etc/nginx/conf.d/*.conf; # client_max_body_size 16m; log_format isp '$bytes_sent $request_length'; server { listen 212.154.200.214:80; server_name 009.kz www.009.kz; rewrite ^(/manager/.*)$ https://$host$1 permanent; error_page 404 = @fallback; location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) { proxy_pass http://212.154.200.214:8080; proxy_redirect http://009.kz:8080/ /; 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 / { proxy_pass http://212.154.200.214:8080; proxy_redirect http://009.kz:8080/ /; 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|js|css|mp3|ogg|mpe?g|avi|zip|gz|b z2?|rar)$ { root /var/www/instore/data/www/009.kz; access_log /var/www/httpd-logs/009.kz.access.log ; access_log /var/www/nginx-logs/instore isp; } location @fallback { proxy_pass http://212.154.200.214:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } } server { listen 212.154.200.214:80; server_name test.009.kz www.test.009.kz; rewrite ^(/manager/.*)$ https://$host$1 permanent; error_page 404 = @fallback; location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) { proxy_pass http://212.154.200.214:8080; proxy_redirect http://test.009.kz:8080/ /; 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 / { proxy_pass http://212.154.200.214:8080; proxy_redirect http://test.009.kz:8080/ /; 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|js|css|mp3|ogg|mpe?g|avi|zip|gz|b z2?|rar)$ { root /var/www/instore/data/www/test.009.kz; access_log /var/www/httpd-logs/test.009.kz.access.log ; access_log /var/www/nginx-logs/instore isp; } location @fallback { proxy_pass http://212.154.200.214:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } } server { listen 212.154.200.212:80; server_name work.maxishop.kz www.work.maxishop.kz; rewrite ^(/manager/.*)$ https://$host$1 permanent; error_page 404 = @fallback; location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) { proxy_pass http://212.154.200.212:8080; proxy_redirect http://work.maxishop.kz:8080/ /; 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 / { proxy_pass http://212.154.200.212:8080; proxy_redirect http://work.maxishop.kz:8080/ /; 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|js|css|mp3|ogg|mpe?g|avi|zip|gz|b z2?|rar)$ { root /var/www/instore/data/www/work.maxishop.kz; access_log /var/www/httpd-logs/work.maxishop.kz.access.log ; access_log /var/www/nginx-logs/instore isp; } location @fallback { proxy_pass http://212.154.200.212:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } } server { listen 212.154.200.212:80; server_name bot.kz www.bot.kz; rewrite ^(/manager/.*)$ https://$host$1 permanent; error_page 404 = @fallback; location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) { proxy_pass http://212.154.200.212:8080; proxy_redirect http://bot.kz:8080/ /; 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 / { proxy_pass http://212.154.200.212:8080; proxy_redirect http://bot.kz:8080/ /; 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|js|css|mp3|ogg|mpe?g|avi|zip|gz|b z2?|rar)$ { root /var/www/instore/data/www/bot.kz; access_log /var/www/httpd-logs/bot.kz.access.log ; access_log /var/www/nginx-logs/instore isp; } location @fallback { proxy_pass http://212.154.200.212:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } } server { listen 212.154.200.214:80; server_name work.009.kz www.work.009.kz; rewrite ^(/manager/.*)$ https://$host$1 permanent; error_page 404 = @fallback; location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) { proxy_pass http://212.154.200.214:8080; proxy_redirect http://work.009.kz:8080/ /; 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 / { proxy_pass http://212.154.200.214:8080; proxy_redirect http://work.009.kz:8080/ /; 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|js|css|mp3|ogg|mpe?g|avi|zip|gz|b z2?|rar)$ { root /var/www/instore/data/www/work.009.kz; access_log /var/www/httpd-logs/work.009.kz.access.log ; access_log /var/www/nginx-logs/instore isp; } location @fallback { proxy_pass http://212.154.200.214:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; } } } Извините что так пришлось сделать но подругому никак ВОт 212.154.200.214 можете не смотреть с ними все нормально. 212 поидее тоже но что такое незнаю
  2. Можно! Но он не загружается почему-то! Сайт через порт апача 8080 не откликается. Тогда это плохо?
  3. Я сам не могу понять почему! Стоит nginx + apache. Домены которые должны откликаться на первый IP адрес работают прекрасно. А домены на другой IP адрес почему выводят ошибку 502. Я просто не понимаю где свзяь. Ладно бы все не работало, а так ваще непонятно. Все настриавалось через ISP Manager. Он автоматом там все настройки же делает и правильно вроде.
  4. Есть сервер с двумя интерфейсами. На одном интерфейсе домены работают прекрасно. На другом почему-то выходит ошибка 502 Bad Getway В логе nginx вот что пишет 2011/11/15 13:54:02 [error] 4742#0: *4894 connect() failed (111: Connection refused) while connecting to upstream, client: ***.***.***.***, server: ****.kz, request: "GET /favicon.ico HTTP/1.1", upstream: "http://212.***.***.***:8080/favicon.ico", host: "****.kz" Пол интернета перерыл, нигде ответа не нашел. Может кот поможет.
×
×
  • Create New...