New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
NginX Proxy to Provider's Solus
clarity_64
Member
As we all know, some providers have their solus on non-standard ports, and this creates issues when you are behind a firewall at work. I know there are several ways around this, but I would like to setup a reverse proxy to the provider's site. Is this possible?
Here is the current setup I am using that is not working, and I am not that great with the harder configs of NginX.
location /provider/ {
access_log off;
proxy_pass https://solus.provider.com:5656;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Comments
Any ideas guys?
I just use Squid and Dante myself; don't really have any experience with NginX, sorry =\
Well, I have a PPTP VPN setup and stuff, but I want to try it this way.
From everything I am seeing, it is setup right, but I am getting an error message from the provider's apache. I can only guess it has something to do with the headers.
If I add login.php/ to the end of the proxy_pass the site loads, but it doesn't follow the new pages.
location /provider/ {
access_log off;
proxy_pass https://solus.provider.com:5656/login.php/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
You can see what I mean at status.clardyhost.com/hostigation
I'm not really an expert on this, but my guess would be that you open your nginx's website with smth like http://dclardy.net/provider/ but there are always issues whent he path in your browser isn't the path configured in Solus or whatever.
From what i see theres no way to fix this by changing your nginx's configuration file.
Try:
proxy_pass https://solus.provider.com:5656$request_uri;
proxy_pass https://solus.provider.com:5656$request_uri;
This gives a 502 bad gateway error.
how about:
proxy_pass https://solus.provider.com:5656$uri;
proxy_pass https://solus.provider.com:5656$uri;
Bad gateway on that as well.
I think that I have gotten it. I can't look at the pretty images though. I will look into why that is.
Edit:
I got it to work. If you would like to login to hostigation from behind a firewall, you can use hostigation.clardyhost.com!
So post the solution please
Here is the config that finally got it working for me.
God the code highlighting looks horrible. Can we get something better?
code with '
Use < pre>< code> </ code></ pre> (Remove space) instead ``
Updated. Thanks for the help! Can we not edit the the code button to place those instead of the ``
Sorry to bump this topic up
My ISP blocked access to facebook, I'm trying to create a proxy, like you did. I replaced:
with:
but it didn't work. It redirects to facebook.com instead serve the facebook page on my domain. Any solution? :-s
@giang: Maybe try the mobile FB site (the mobile site doesn't depend heavily on JS).
My ISP blocked all access to facebook Even mobile page/mobile apps
Was meaning put the mobile site into nginx instead of the main site: http://m.facebook.com/
I could make it work by remove:
But it still need to connect to www.facebook.com when login, register...
This will get you to the facebook site. The only issue is when you try to login, you are redirected. I will look into that more.
Your ISP block Facebook? Wow, never seen that (except China) ... are you in China? You can try VPN.
No, I'm Vietnamese. A lot of coutries blocked facebook, not only china
My ISP seems got problem with AAG (Asia American Gateway) cable, broken (again @_@) or something so they temporary use china gateway
Facebook uses a ton of javascript, almost NOTHING is loaded off www.facebook.com
@giang: Why don't you simply setup SSH tunnel?