Koozali.org: home of the SME Server

Proxying ports through Apache

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Proxying ports through Apache
« on: February 16, 2008, 07:31:36 AM »
I have packaged the translation tool named Pootle for future implementation under contribs.org. Meanwhile it is running at http://www.unixlan.com.ar:8888
I want to know how to improve the performance with this method.
The doc is located at http://translate.sourceforge.net/wiki/pootle/apache

I need help.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Proxying ports through Apache
« Reply #1 on: February 16, 2008, 08:27:35 AM »
I have packaged the translation tool named Pootle for future implementation under contribs.org. Meanwhile it is running at http://www.unixlan.com.ar:8888
I want to know how to improve the performance with this method.
The doc is located at http://translate.sourceforge.net/wiki/pootle/apache

I need help.
Normando, I assume you are running this on a SME Server, considering the HowTo you were writing. Did you already try this: http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass?

Not sure if this will work in your situation as well but I guess it will do, ProxyPassDomain needs to be replaced with whatever you like it to be accessible by for instance translate.unixlan.com.ar and ProxyPassTarget would be your external IP number including the port if I understand it correct.

You might have to add a CNAME to your DNS records if you do not have a  catchall (A *.unixlan.com your-ip-number) record configured to point the new domain translate.unixlan.com.ar to your ip-number.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Proxying ports through Apache
« Reply #2 on: February 17, 2008, 07:53:54 AM »
Yes, running (of course :) ) under one SME.

I will try tomorrow, after fix some issues with Pootle.

Thank you Jonathan

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Proxying ports through Apache
« Reply #3 on: February 17, 2008, 08:35:59 PM »
Well, I have setup proxypass to pootle server, but there are a few issues. I have set up:

Code: [Select]
db domains set translate.unixlan.com.ar domain Nameservers internet
db domains setprop translate.unixlan.com.ar ProxyPassTarget http://192.168.0.1:8888
db domains setprop translate.unixlan.com.ar TemplatePath ProxyPassVirtualHosts
signal-event domain-create translate.unixlan.com.ar

As you can see we have access to http://translate.unixlan.com.ar
But when click at a link (not top links) I give this error:

Quote
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /projects/sme7bc/.

Reason: DNS lookup failure for: 192.168.0.1:8888projects

See there is no "/" at 192.168.0.1:8888projects. The correct will be 192.168.0.1:8888/projects.
I don't know if this is the problem.

Any help I appreciate
« Last Edit: February 17, 2008, 08:37:38 PM by Normando »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Proxying ports through Apache
« Reply #4 on: February 17, 2008, 08:42:09 PM »
Well, I have setup proxypass to pootle server, but there are a few issues. I have set up:

Code: [Select]
db domains set translate.unixlan.com.ar domain Nameservers internet
db domains setprop translate.unixlan.com.ar ProxyPassTarget http://192.168.0.1:8888
db domains setprop translate.unixlan.com.ar TemplatePath ProxyPassVirtualHosts
signal-event domain-create translate.unixlan.com.ar

As you can see we have access to http://translate.unixlan.com.ar
But when click at a link (not top links) I give this error:

See there is no "/" at 192.168.0.1:8888projects. The correct will be 192.168.0.1:8888/projects.
I don't know if this is the problem.

Any help I appreciate
Yes that is a problem like you already expected, it is easy to correct by adding a trailing slash (I quoted it to make sure that the trailing slash is added into the database entry), which means changing the second line into:
Code: [Select]
db domains setprop translate.unixlan.com.ar ProxyPassTarget "http://192.168.0.1:8888/"After that again have the configuration changes picked up by the relevant services:
Code: [Select]
signal-event domain-create translate.unixlan.com.ar
Then test again...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Proxying ports through Apache
« Reply #5 on: February 17, 2008, 09:43:06 PM »
Yes that is a problem like you already expected, it is easy to correct by adding a trailing slash (I quoted it to make sure that the trailing slash is added into the database entry), which means changing the second line into:
Code: [Select]
db domains setprop translate.unixlan.com.ar ProxyPassTarget "http://192.168.0.1:8888/"After that again have the configuration changes picked up by the relevant services:
Code: [Select]
signal-event domain-create translate.unixlan.com.ar
Then test again...

Wow, excellent!

I have modify a little for test and run ok:

Code: [Select]
db domains setprop translate.unixlan.com.ar ProxyPassTarget http://192.168.0.1:8888/
signal-event domain-modify translate.unixlan.com.ar

Thank you.
I will announce at the wiki and bugs to change the pootle url, because proxying through apache is very fast.

To do: fixed a few pootle links.
« Last Edit: February 17, 2008, 09:45:59 PM by Normando »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Proxying ports through Apache
« Reply #6 on: February 17, 2008, 09:46:06 PM »
Thank you.
You're welcome, it was pretty easy you could have fixed it yourself :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Proxying ports through Apache
« Reply #7 on: February 18, 2008, 02:27:15 AM »
Normando

The trailing slash is required as stated in the wiki

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass

...

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Proxying ports through Apache
« Reply #8 on: February 18, 2008, 02:38:18 AM »
Normando

The trailing slash is required as stated in the wiki

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass


Yes. I now see the trailing slash... :shock:
Thank you Ray