Показаны сообщения с ярлыком balance. Показать все сообщения
Показаны сообщения с ярлыком balance. Показать все сообщения

19.05.2015

Nginx настройка/заметки/nginx.conf

Модуль rewrite (заглушка):

#nano /etc/nginx/conf.d/default.conf

server {
  listen 80;
  location / {
    rewrite ^.*$ /maintance.html;
  }

  location /maintance.html {
    alias /var/www/html/maintance.html;
    expires -1;
  }
}

or:

server {
        listen       192.168.1.107:80;
        server_name  localhost;

        location / {
            root   /usr/local/www/nginx;
            index  index.html index.htm;
        }

        rewrite ^/(.*) http://192.168.1.80 redirect;
        return 403;
    }

Перенаправление запросов на порт - заглушку.
iptables -t nat -A PREROUTING -i eth1 -p tcp --destination-port 80 -j REDIRECT --to-port 8088
iptables -t nat -A PREROUTING -i eth1 -p tcp --destination-port 443 -j REDIRECT --to-port 8088