Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Kov
    • Nábytek
    • Jídlo
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • IT hardware a podpora
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

odoo13ce, multi website, second website domain (site2.com) cannot handle alias (www.site2.com)

Odebírat

Get notified when there's activity on this post

This question has been flagged
aliasmulti-website
3 Odpovědi
6324 Zobrazení
Avatar
Nanyo Nanev

Hi,

I have got odoo13 community edition.
Single DB.
2 companies and 2 websites publicly accessible using Nginx reverse proxy. Each site has got public domain and DV wildcard SSL certificate installed and working correctly.
The first site is configured as site1.com and has no issues to respond if the request is to site1.com or www.site1.com.
The second site is configured as site2.com (no www.) and has no issues to respond to the request to site2.com, but if the request is www.site2.com it redirects the web user to site1.com!
By saying configured I mean Settings/Websites/Domain name = site1.com or site2.com
It works for site1.com - you can request site1.com or www.site1.com and the same website will open - website 1.
The same config for site2.com seems to work only if you request exactly what is written in the field of the domain name - site2.com. I had a play and amended the field from site2.com to www.site2.com. Yes, now you can open the website 2 only if you request www.site2.com. The site2.com will open website 1.
There is no option to put site2.com and www.site2.com, together in the same domain name field as all request will go to the website 1 only, i.e. website 2 cannot be reached.
Both domain DNS services are configured as follows:
site1.com -> a.a.a.a
www.site1.com is a cname to site1.com
site2.com ->a.a.a.a
www.site2.com is a cname to site2.com

As a result, the ping to each is leading to the same IP:
ping site1.com -> a.a.a.a
ping www.site1.com -> a.a.a.a
ping site2.com -> a.a.a.a
ping www.site2.com -> a.a.a.a

As expected the IP a.a.a.a is publicly accessible on port 80/443.

Nginx configuration for each block (virtual host) is identical and checked.

Do you know how can I let the web users go to the website 2 (site2.com) regardless of what they type - site2.com or www.site2.com?

Thank you in advance!

1
Avatar
Zrušit
zahid

I have same setting with 13CE. one database , two domains . domai1.com working fine domain2.com points to database selector.
How did you manage to get multi website/domain working ?

Nanyo Nanev
Autor

Odoo v.13 and v.14 can handle the first domain domain1.com with both domain1.com and the subdomain www.domain1.com, without any issues. The second domain (and any other on top) may have only one pointer - domain2.com or www.domain2.com, but not both. The result is:
domain1.com - resolves and opens the expected page
www.domain1.com - resolves and opens the desired page
domain2.com - if set up - resolves and opens the desired page, but the subdomain www.doamin2.com doesn't work
www.domain2.com - if set up - resolves and opens the desired page, but the domain domain2.com doesn't work

The experience with domains 3, 4 and so on is the same as per domain2.com

I have not received any help or proper communication from Odoo support at that time. My conclusion is multidomain is initially designed to serve a single company like:
domain1.com - works fine
www.domain1.com - works fine
any other subdomain like www will work fine as:
eshop.domain1.com - it is like an additional domain, but you do not need www.eshop.domain1.com as only the subdomain main name is enough.
intranet.domain1.com

It is advertised as multidomain and multi-company and generally speaking is true, but you cannot add two independent websites and to expect to request the content via www or without it for both.

I didn't play with the latest version 15 yet. And I do not plan to do it in the scope of the webserver.
I spun a VM with WP for the regular websites, where I need www. and the main domain. The eshop subdomain only can live on the Odoo.

Back to the question of why you can see the database selector? The reason is you didn't hide it. If you do it the problematic record will open the webpage of your domain1.com.

Avatar
Kazim Kazim
Nejlepší odpověď

Hi @Nanyo, i have an issue with multi website domains. So when i define my second domain it redirects back to db selector and not the website. how did you manage to configure the multiple domains please

1
Avatar
Zrušit
Nanyo Nanev
Autor

Sorry, I didn't come here for a while. Please have a look at the answer I gave to zahid

Avatar
Ermin Trevisan
Nejlepší odpověď

 You can use a CNAME DNS entry to link the subdomain www to a domain, or you can use a permanent redirect (301) in your reverse proxy. With nginx such a redirect looks like this:

server { 
# Redirect non-www to www
server_name example.com;
return 301 $scheme://www.example.com$request_uri;

with Caddy Server such a redirect looks like this:

example.com {
    redir https://www.example.com{uri}
}

About which way is to prefer (especially from a SEO perspective), you may find many interesting readings in the internet. When using redirects, you avoid the problem of indexing of both domains by search engines.


0
Avatar
Zrušit
Nanyo Nanev
Autor

Hi Ermin,

Thank you for your reply! If you read again the very first post you will see the CNAME DNS game has been played already. The reverse proxy at NGINX has been configured as you suggested before the first post. You are correct for the very first website in a multi-website configuration. The problem is with the second and next websites. The very first website works with the www subdomain and the domain only. Odoo interface will allow you to enter only one domain or subdomain (www), but not both. Apparently, it is not an issue for the first website. I decided I am not fluent and checked with two of the Gold partners. I have sent them the NGINX config and revealed the real domains so they checked the CNAME for both domains.

The only one solution is to have a "translator" before the reverse proxy and to convert the incoming request to the expected from Odoo (exactly what you put in the name of the domain at the Odoo interface). This translator can be anything, but the load balancer would do the job. I bet all customers at Odoo.com portal are welcomed by load balancers and they "translate" the request of www subdomain to the domain only.

I am happy to share in a personal message with you the DNS config and NGINX config. Also happy to jump into a screen sharing session with you. I appreciate you may know something that others and I do not.

I would be curious to test it with Odoo v15. I doubt it would be resolved as this is an isolated case and if you intend to have different domains it is highly likely to have load balancers with multiple apps and PostgreSQL boxes.

Ermin Trevisan

Using permanent redirects in the reverse proxy, you only send one hostname per domain to Odoo (either with or without www, upon your decision).

Ermin Trevisan

In my example Odoo will only receive requests for www.example.com, requests without www will be converted to www.example.com before it reaches Odoo.

Ermin Trevisan

To make it very clear: After the redirect, there is only one server_name (in nginx-language) left, you do not proxy both www and non-www domains afterwards.

Avatar
Nanyo Nanev
Autor Nejlepší odpověď

I have tested the same case in Odoo v14. Same results. It is not an issue. It is by design. If you want to have multiple websites and to have their www subdomain and their domain (www.domain.com + domain.com) you need a load balancer(s), where you can describe the rules and push the "correct" request to Odoo's NGINX.
I will take it as resolved (in a hard way)!

0
Avatar
Zrušit
Ermin Trevisan

I can not see any relation to load balancers.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
How to use the Odoo theme in multi-clone websites?
multi-website
Avatar
0
bře 24
1684
Multi company/multi website leading to same website Vyřešeno
multi-website
Avatar
Avatar
2
pro 23
5245
Questions on setting Odoo up for 2 websites on Linode Server (odoo v15)
multi-website
Avatar
Avatar
Avatar
2
bře 23
2822
Alias Accepts Emails From ?
alias
Avatar
0
pro 21
4536
Unable to create second website
multi-website
Avatar
1
bře 20
2476
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now