I am trying to get WPML (Wordpress Multi-language) plugin to run on Nginx without success. According to the WPML site, the Apache servers must have the following Rewrites:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I put
try_files $uri $uri/ /index.php?q=$uri&$args;
in my Nginx virtual host configuration. I do not get an error. The goal is to have English content refer to domain.com, Japanese to domain.com/ja/ and Vietnamese to domain.com/vi/. In Wordpress I set permalinks to /%postname%/. So far I cannot seem to get the Japanese and Vietnamese content to open with the correct URIs.
Any suggestions? Below is my nginx virtual host config:
server {
listen 80;
server_name domain.com;
access_log /srv/www/domain.com/logs/access.log;
error_log /srv/www/test.protekus.com/logs/error.log;
location / {
root /srv/www/domain.com/public_html;
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include /opt/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/srv/www/domain.com/public_html$fastcgi_script_name;
}
This seems to be an issue with many WPML users that has not had a solution yet.
CEO, Protekus Security Solutions - Vietnam
http://www.protekus.com
Location, Saigon (HCMC), Vietnam