Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2015-10-07 14:55:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Accessing TXP website via Proxy doesn't work

Karsten wrote #295455:

Users visiting the site via this proxy will see additional content (blocked to normal visitors) so that’s why the proxy is needed.

Couldn’t a plugin like rvm_privileged be used for that? You will need to send registrations (even without any editing rights) to all you wish to have access to that content. There must be an easier way than a proxy for this.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#14 2015-10-08 12:26:44

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Accessing TXP website via Proxy doesn't work

Hi Yiannis,

the proxy is used to give ALL users of an entire university access to particular content on our site. If they visit from the campus their IP is recognized, if they work from home, they can access those parts of our site when they visit via the proxy of the university library system. The latter access mode however is rather slow for some reason.

Offline

#15 2015-10-08 12:32:12

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Accessing TXP website via Proxy doesn't work

Dear Jacob,

thanks for the suggestions. I think however I’ll keep my permlink model as it is. I have a TXP output system that generates the list of permlinks, simply have to copy paste them to my htaccess file and voila. The ISBNs of the books are currently not in that format part of the textpattern site. Also I like the idea that the permlinks are not part of any system. If for whatever reason I chose to switch to another CMS the permlinks system remains operational, it’s simple, it works, and is not part of (and thus dependant on) any particular system.

I did however transfer these to a separate htaccess file in the /permlink/ folder. Hence keeping the htaccess in the root of the website a bit cleaner.

Last edited by Karsten (2015-10-08 12:33:24)

Offline

#16 2015-10-08 12:34:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Accessing TXP website via Proxy doesn't work

Karsten wrote #295490:

Hi Yiannis,

the proxy is used to give ALL users of an entire university access to particular content on our site. If they visit from the campus their IP is recognized, if they work from home, they can access those parts of our site when they visit via the proxy of the university library system. The latter access mode however is rather slow for some reason.

I see. I guess it is working like a VPN. The numbers and the logistics of adding so many users would also be a nightmare to maintain as students or even staff changes on a regular basis.

I am wondering if a dev could gain temporary access so as to problem-solve your issue. Would it be possible? Devs.. ?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#17 2015-10-08 12:37:12

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Accessing TXP website via Proxy doesn't work

What about rah_ip_range?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#18 2015-10-08 12:41:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Accessing TXP website via Proxy doesn't work

uli wrote #295493:

What about rah_ip_range?

Hi Uli, it sound like an excellent idea if the proxy has a limited number of IPs!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#19 2015-10-08 14:31:10

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Accessing TXP website via Proxy doesn't work

Jup, the proxy is used so all 10s of thousands of students staff and alumni can access the website from their home computers or anywhere else in the world, if they log in via the Uni proxy.

We have a temporary access to the proxy but can’t figure it out, also our website host, who is an excellent programmer says everything seems to work well and can’t account why access is so slow

Rah_ip_range does work, but not for this purpose. I want to enable access to the same content to possibly hundreds of universities, who all have thousands of students/staff.

what I did now is activate a Global via a Php script

<txp:php>
global $access;
$explode = explode('.', $_SERVER['REMOTE_ADDR']);


if (
"$explode[0].$explode[1].$explode[2]" == '99.199.99' && ($explode[3] >= 1 && $explode[3] <= 255) )
{
$access = 1; //university one
}

elseif (
"$explode[0].$explode[1].$explode[2].$explode[3]" == '99.299.99.99' )
{
$access = 2; //university two
}

etc, etc, etc.
)

Subsequently I use smd_if to check if the variable “access” has a value to decide if someone has access

<txp:smd_if field="phpvar:access" operator="gt" value="0">

and also I can use this to greet visitors from specific universities based on the value, if value = 1, welcome university one!

<txp:smd_if field="phpvar:access" operator="eq" value="1">
University one
</txp:smd_if>

<txp:smd_if field="phpvar:access" operator="eq" value="2">
University two
</txp:smd_if>

these are stored in a separate form so i can simply say “welcome people from [run output form univ names]”

so this is how I did that :)

Moderator’s annotation:
Edited to add Textile markup for better readability.
– Uli –

Last edited by uli (2015-10-08 14:39:50)

Offline

#20 2015-10-08 15:23:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Accessing TXP website via Proxy doesn't work

This is just brainstorming:)

Did you try to do a trace in the terminal (mac): traceroute http://proxy-ub.com/login?url=https://www.mydomain.com/library/index.php? It might pinpoint as to where the delay is. If it is in the end, it will have to be a txp problem which will of course need to be resolved. Anywhere in between will be the proxy’s problem.

ps. Somebody with more knowledge please correct me if I am wrong!

Last edited by colak (2015-10-08 15:26:59)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2015-10-08 16:00:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Accessing TXP website via Proxy doesn't work

@Colak: You can’t do a traceroute to an URL

@Karsten: have you tried visiting the website from the proxy. Not using the proxy software, but visiting the website from the proxy computer, basically using the proxy computer as the client machine. Does the website respond quickly and behave as expected then?

If that’s not possible, take a look at the webserver log files (not those in TXP) and compare a page request done directly with a page request done via the proxy (same page, only difference would be using the proxy yes/no). Do you see a difference there?

Offline

#22 2015-10-12 15:04:55

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Accessing TXP website via Proxy doesn't work

HI Ruud, not sure how to do that. Proxy computer is probably somewhere in the world, but not here. According to our website host nothing can be found in the logs, he has no idea why access to the page is slow.

Perhaps anyone knows a quick proxyserver and can test if our site runs quickly via that one? our site: https://www.sidestone.com

Offline

#23 2015-10-12 15:56:34

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Accessing TXP website via Proxy doesn't work

Karsten, I was under the impression that the proxy server involved was under control of the company/institute where your website is hosted.

There should always be something in the logs. Normally all requests, even successful ones are logged.

Offline

#24 2015-10-12 19:58:26

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Accessing TXP website via Proxy doesn't work

Karsten wrote #295329:

So when I link to

http://proxy-ub.com/login?url=https://www.mydomain.com/library/

it doesn’t work

however

http://proxy-ub.com/login?url=https://www.mydomain.com/library/index.php

does seem to work, albeit very very very slowly.

Two things – firstly, the domain proxy-ub.com isn’t registered – was this a placeholder to demonstrate what works and what doesn’t? Second, I wonder if this has something to do with ordering of Allow and Deny on the proxy setup (rather than the .htaccess) for the domain in question. Can you obtain the config and post it here, Karsten?

Offline

Board footer

Powered by FluxBB