GTranslate Pro + node + apache2 + proxypass [no problem]

Popular automatic website translation tool

GTranslate Pro + node + apache2 + proxypass [no problem]

Postby tnelson » Wed Sep 11, 2013 6:34 pm

Here is my virtualhost config :
<VirtualHost 10.10.10.10:80>
ServerName example.com
ProxyPreserveHost On
ProxyPass /gtranslate/ !
# node service listenning on localhost port 3000
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/

DocumentRoot /home/directory_containing_gtranslate
AddDefaultCharset utf-8
# gtranslate config
RewriteEngine on
RewriteRule ^/([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^/([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^/([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
</VirtualHost>

I had to create cache/js wich was missing

Evertything works fine, thanks for this great software. I had to move from google translate because it was hard to add corrections.
tnelson
 
Posts: 2
Joined: Wed Sep 11, 2013 6:27 pm

Re: GTranslate Pro + node + apache2 + proxypass [no problem]

Postby Edvard » Thu Sep 12, 2013 2:39 pm

Hi,

"js" is not a language code, so creating cache/js folder was not necessary. Probably you have js folder which contains javascript script files. You need to make sure that js in not considered as a language code in your rewrite rules.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: sadashiv and 0 guests

2GLux