Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Different domain for different languange with same content
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Different domain for different languange with same content

Hello LET,

I need to acess different languange for 2 domains but it will share same content for the website,
eg : en.domain.com and es.domain.com
both have same content and database just different languange, can i accomplish this config?currently using apache as backend and nginx as frontend

Comments

  • Well, NGINX itself cannot translate, but you can use server blocks to separate the two domains. Example (port 81 is Apache serving English requests, 82 for French:

    server {
    server_name en.example.com;
    location / {
    proxy_pass 127.0.0.1:81; 
    }
    }
    
    server {
    server_name fr.example.com;
    location / {
    proxy_pass 127.0.0.1:82; 
    }
    

    You can change it accordingly - use it as you please :)

  • @robohost What CMS are you using?

  • @doghouch said:
    Well, NGINX itself cannot translate, but you can use server blocks to separate the two domains. Example (port 81 is Apache serving English requests, 82 for French:

    > server {
    > server_name en.example.com;
    > location / {
    > proxy_pass 127.0.0.1:81; 
    > }
    > }
    > 
    > server {
    > server_name fr.example.com;
    > location / {
    > proxy_pass 127.0.0.1:82; 
    > }
    > 

    You can change it accordingly - use it as you please :)

    Any documentation i can learn for different apache port for different languange?

    @vRozenSch00n said:
    robohost What CMS are you using?

    i'm using custom CMS mas bro

  • vRozenSch00nvRozenSch00n Member
    edited November 2015

    Create 2 vhosts, i.e en.contoh.com & fr.contoh.com.

    If your main language is en.contoh.com, put all CMS here.

    in fr.contoh.com place custom index.php containing filter for variables to query second language from main CMS functions and template to show the query in website format.

    You need to have 2 tables (field sets) one for each language, or additional key field to identify language to be selected.

    Eh, ini cuma bisa kalo servernya sama (satu UID).

  • While google is full of bullshit when it comes to its guidelines and pompous PR ethics, this might be what you're looking for :

    https://support.google.com/webmasters/answer/182192?hl=en

Sign In or Register to comment.