Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Связка Nginx reverse proxy + Nginx proxy Manager + cloudflare + DNS сервер в виде (ms 2019 не обязельно но по красоте)

Featured Replies

Posted

1. настройка Nginx proxy manager для получения реального ип клиента(Тут мы кастрируем все подсети CL и передаем в заголовке реальный ип клиента):
 

set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2a06:98c0::/29;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 10.10.1.0/24;
set_real_ip_from 10.10.0.0/24;
real_ip_header X-Forwarded-For;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;


2.Ставим nginx на тачку с форумом и делаем самоподписные сертификаты чтобы между локальными машинами где стоит сервер проксирования и веб сервер трафик был защищен(выполняем команду в паке с сертами не надо в корне сервера хранить хлам /etc/nginx/ssl (Если нет создаем)):

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout site.key -out site.crt 

 

3. Сам конфиг nginx:
server {
    listen 443 ssl http2;
    server_name forum.site.ru; #Тут указываем сайт

    root /var/www/forum.site.ru/; #Тут каталог с форумом
    index index.php index.html index.htm;

    set_real_ip_from 10.10.1.15; #Тут указываем ип сервера проксирования
    set_real_ip_from 10.10.1.66; #Тут указываем ип сервера с форумом
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;

    client_max_body_size 100M;

    ssl_certificate /etc/nginx/ssl/site.crt; # Путь до серта
    ssl_certificate_key /etc/nginx/ssl/site.key; # Путь до ключа

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256';
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;

    location /nginx_status { # этот блок используется для мониторинга zabbix если не нужен можете убрать
        stub_status on;
        allow 10.10.1.0/24;
        deny all;
    }

    location "\.(js|css|jpeg|jpg|gif|png|ico|map|webp)(\?|$)" {
        try_files $uri /404error.php$is_args$args;
    }

    location / {
        try_files $uri $uri/ /index.php?$args;
        proxy_read_timeout 3600;
        proxy_connect_timeout 3600;
        proxy_send_timeout 3600;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Adjust PHP version and path if necessary
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_read_timeout 3600;
    }

    location ~ /\.ht {
        deny all;
    }
}

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.