Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: Normando on February 16, 2008, 07:31:36 AM

Title: Proxying ports through Apache
Post by: Normando 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.
Title: Re: Proxying ports through Apache
Post by: cactus 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 (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.
Title: Re: Proxying ports through Apache
Post by: Normando 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
Title: Re: Proxying ports through Apache
Post by: Normando 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
Title: Re: Proxying ports through Apache
Post by: cactus 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...
Title: Re: Proxying ports through Apache
Post by: Normando 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.
Title: Re: Proxying ports through Apache
Post by: cactus on February 17, 2008, 09:46:06 PM
Thank you.
You're welcome, it was pretty easy you could have fixed it yourself :-)
Title: Re: Proxying ports through Apache
Post by: raem 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

Title: Re: Proxying ports through Apache
Post by: Normando 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