Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
106 Tampilan

I have setup odoo (including an ecommerce site) on a linode server (Odoo v15), community edition).  Within the Odoo setup I have also setup a second website (for a different region).  Each website has their own domain name.  Thanks to some help I got here I have the two websites working quite well together,  the 2 sites share a few pages (including the sale items etc) and things are good.  

I am just having one last issue I have not been able to resolve.  And, I think this issue is having a negative effect on people finding my second site (for the other region).  The situation is that if i go to a browser and enter the full address for the second site (with the 'www') it works - the second site comes up.  However, if I go to a browser and enter the address of the second site (without the 'www'), the browser actually takes me to my first site.  In other words, if I try to go to the second site via a browser (just by putting in the address) it will take me to the first site unless I specify the 'www' in the address.

I am not sure whether the problem is within my odoo setup or within any of my domain settings etc on the linode side.  Any ideas on what I might be able to do to resolve this issue?  Many thanks in advance.


Avatar
Buang
Jawaban Terbai

Hello,

The cause of the problem you are facing may vary. From my experience, this can be from an incorrect setup in domain registrar which is having a domain redirection set up. If you are running multiple website in odoo (in a single database) you need to disable domain redirection from registrar and also point both domain using "A record" to your VPS Public IP address which in this case you are using linode.


Then, the second setup it is from Nginx configuration side inside /etc/nginx/system-enabled. It is best to split each domain with different files. For example if you have website1.com and website2.com, then you need to make 2 files inside that folder. Inside, you need to define server_name parameter with and without www (this is important).


Here's the nginx example .conf that you can try :


https://drive.google.com/drive/folders/1TXtpqmzrG-WCcOi56dK6EprRy1OUVWIG?usp=sharing


hope this helps,


Altela (www.altelasoftware.com)

Avatar
Buang