Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

Cracked.to | Best Forum Around | Free Premium Accounts

 149

Make your own reverse Proxy - Tutorial

by woodcat - 17 April, 2021 - 11:13 AM
This post is by a banned member (woodcat) - Unhide
woodcat  
Supreme
101
Posts
6
Threads
(This post was last modified: 17 April, 2021 - 11:21 AM by woodcat. Edited 4 times in total.)
There are numerous situations, where a reverse proxy for your web server can be useful for you.
It is pretty easy to setup, however, depending on your operation, you might need some additional configuration
We will set up an Nginx on our server with IP 5.206.xxx.xxx, which will act as a reverse proxy and pass our requests to 1.1.1.1 (Cloudflare App)

Installing Nginx
Code:
apt -y install nginx


After a successful installation of nginx, head over to the configuration file
Code:
nano /etc/nginx/sites-enabled/default

Search for location and remove the following line:try_files $uri $uri/ =404;
Then replace it with
Code:
proxy_pass https://1.1.1.1

Instead of 1.1.1.1 you could use another site as well, maybe your own site, in order to hide it's IP? Or a site you always want to access with the servers IP? (NOTE: You will have to take care of the forwarded by header then, which would reveal your real IP)

Now let's test the configuration
Code:
[email protected]:/etc/nginx/sites-available# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Restart and reload nginx and we are ready to go :)
Code:
systemctl restart nginx
systemctl reload nginx


Now on to the test, our server IP should now show the contents of 1.1.1.1 
[Image: Zc3i4U3.png]

It works! Our Nginx server now forwards all requests to 1.1.1.1

Enjoy, don't forget like 
Hackerman
This post is by a banned member (Kulna12) - Unhide
Kulna12  
Supreme
169
Posts
59
Threads
#2
interesting
[Image: radost-21.gif]
This post is by a banned member (woodcat) - Unhide
woodcat  
Supreme
101
Posts
6
Threads
#3
Thanks  Hackerman

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)