|
#1
|
|||
|
|||
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; } } /etc/apache2/ports.conf Listen 444 sudo a2enmod proxy sudo a2enmod proxy_http Code:
<VirtualHost *:444> <Location /> ProxyPreserveHost On ProxyPass http://mysite.xyz:2710/ retry=0 ProxyPassReverse http://mysite.xyz:2710/ </Location> 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 </VirtualHost> Has anyone done this and can confirm it's actually possible? |
#2
|
|||
|
|||
Any any specific reason that you are using httpd y not use nginx ?
__________________
Live Free... Share Free... |
#3
|
|||
|
|||
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.
Last edited by Krypto; 4th April 2020 at 06:47. Reason: Do not quote a post that is directly above your own. |
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
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.
__________________
Live Free... Share Free... |
|
|