Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   xBTiT (http://www.bvlist.com/forumdisplay.php?f=30)
-   -   Xbt apache reverse proxy? (http://www.bvlist.com/showthread.php?t=12241)

madness85 3rd April 2020 15:52

Xbt apache reverse proxy?
 
It's easily done with nginx:


Code:


#Tracker
server {

    listen 2083 ssl;
    ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
    server_name  localhost;
      location / {
      rewrite ^(.*)$ $1?ip=$remote_addr break;
        proxy_pass http://127.0.0.1:8080/;
        proxy_redirect    off;
        proxy_set_header  Host                  $http_host;
    proxy_set_header  X-Real-IP        $remote_addr;
    proxy_set_header  X-Forwarded-For  $remote_addr;
    access_log off;
    log_not_found off;
      }
    }

But what about apache? This is what I've tried so far:

/etc/apache2/ports.conf

Listen 444

sudo a2enmod proxy
sudo a2enmod proxy_http


Code:




  ProxyPreserveHost On
  ProxyPass http://mysite.xyz:2710/ retry=0
  ProxyPassReverse http://mysite.xyz:2710/

SSLEngine On
        SSLCertificateFile /etc/letsencrypt/live/mysite.xyz/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/mysite.xyz/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

Xbt is working on both ports 2710 and 444, the problem is IP, im getting the proxy IP in peers. I've tried remoteip adding headers etc, nothing seems to work.

Has anyone done this and can confirm it's actually possible?

rio 3rd April 2020 18:11

Any any specific reason that you are using httpd y not use nginx ?

madness85 3rd April 2020 23:08

This is for education purposes only. It's easy to do with nginx but I can't find anywhere someone archiving the same with apache.

fullcrumcake 10th April 2020 20:05

Apache is a bad reverse proxy, it's too heavy. You would want a light web server to be your reverse proxy. Basically the more traffic you get the more you'd end up wanting to use Nginx because it scales better.

rio 10th April 2020 21:37

Apache has come a long way since the old days if configured properly it can be just as fast as nginx and handle the same amount of traffic, nginx is a pain if you want to add modules but its easier to configure.:coffee:


All times are GMT +2. The time now is 01:12.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.