K
K
konchober2017-06-11 00:09:12
linux
konchober, 2017-06-11 00:09:12

How do I set up a proxy to forward all requests to my web server?

Hey! I really need the help of the collective mind! Given:
1) Browser, for example, Firefox. The settings specified HTTP proxy and SSL proxy: 192.168.0.2 with port 8080
2) Server with Centos 6 on which you can install any software.
3) PHP/PHP-FPM 7.1
4) Nginx which listens on port 80 for any domain name and runs fastcgi_pass on php-fpm.
5) Also, nginx listens on port 8080 and makes it proxy_pass http://localhost:80/
This configuration allows me to easily preprocess all requests and responses, but only for HTTP sites. But since now many sites are forced to redirect to their HTTPS version, this configuration is of little use.
The problem is that Nginx cannot act as a full-fledged ssl proxy, because does not know how to work with a specific CONNECT method. Having studied the Internet on this topic, I learned a sad fact: all existing reverse / balance proxies cannot accept requests from clients via the ssl proxy protocol, and all existing proxy servers cannot proxy pass to an external handler.
I really hope that I googled badly and missed a ready-made solution. As an alternative solution, a proxy can come up that can change the DNS for all hosts to the one I specified.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question