Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

How to set database filter on sub domain for odoo website using apache web server

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
17 Antworten
25548 Ansichten
Avatar
Anil Kesariya

Hello Everyone,

Is it possible to filter database on single instance by defining server alias in apache configuration file?

I can achieve this by creating multiple sites configuration files and running multiple instance of opnerp server.

But I want that to be done by runnning single openerp instance. If anyone has idea regarding this will be appreciated.

Thank you.

Anil.

 

 

 

 

6
Avatar
Verwerfen
Anil Kesariya
Autor

Hi Anil, I assume that you have created the databases x2 already right? -- http://opensourceholic.com/2014/05/09/deploy-openerp-using-mod_proxy-and-mod_wsgi-on-linux-server/ The page above looks sound.. But haven't tested !!but i see??. v7: group.add_option("--db-filter", dest="dbfilter", default='.*', v8 / v9alpha: group.add_option("--db-filter", dest="dbfilter", my_default='.*', So Check versions, and wsgi config and other configs. and clearly the dB's need to be created first... Good Luck

Anil Kesariya
Autor

@vee I already have more than two database. I don't want to config the openerp with wsgi. I have applied the filter pattern inside the config.py file. thanks for your comment.

Avatar
swapnil wagh
Beste Antwort

Hi Anil,
 

If you are working on local machine you should edit /etc/hosts with something like this:

127.0.0.1 foo.localhost

127.0.0.1 bar.localhost

where foo and bar are the db names.

Your virtual host file should look like this:

<VirtualHost *:80>

ServerName localhost

ServerAlias *.localhost // Use this if you want dbfillter on subdomain

ErrorLog /var/log/openerp/openerp-error.log

CustomLog /var/log/openerp/openerp-access.log combined

<Proxy *>

Order deny,allow

Allow from all

</Proxy>

ProxyRequests Off

ProxyPass / http://localhost:8069/

ProxyPassReverse / http://localhost:8069/

ProxyVia On

LogLevel warn

</VirtualHost>

After that  write dbfilter = ^%d$ in your openerp/tools/config.py file. After that restart apache2 and openerp.

In case you are doing all this on VPS and you bough a domain from domian provider, then you dont need to edit/etc/hosts file.

You can read a blog post for more information : http://goo.gl/1Ub8sc

7
Avatar
Verwerfen
Anil Kesariya
Autor

Hello Swapnil Thank I appreciate response. I have followed your step but couldn't achieved my requirements. Its redirect me to create new database page in any domain.

Anil Kesariya
Autor

@vee I already have more than two database. I don't want to config the openerp with wsgi. I have applied the filter pattern inside the config.py file. thanks for your comment.

swapnil wagh

@Anil Can you give me some more details for better understanding your issue, Are you working on local machine? Can you share your Apache configuration and openerp configuration?

Anil Kesariya
Autor

@Swapnil Yes I am working on local machine. I have gone through all the step you mention. I can login through applied domain on virtual host. only remaining portion is to set sub domain for database.

swapnil wagh

@Anil, did you create two entries like 127.0.0.1 foo.localhost 127.0.0.1 bar.localhost replace foo and bar with your two database names, on local you can't use serverAlise for subdomain, use foo.localhost.com as servername then change db-filter in openerp/tools/config.py to %d. It should work I personally when I deploy openerp.

Anil Kesariya
Autor

@sapanil. Previously i used server alias for sub domain. I replaced with the specific subdomain. still having same screen of manage database.

OdooBot
@Anil,

Do you really have a database on server please check the db user might be you have db but the owner is different than what you have in openerp config, odoo redirect you to database manager page only when you don't have db single db created on server.

On Wed, Oct 15, 2014 at 11:03 AM, Anil Kesariya <a.kesariya.serpentcs@mail.odoo.com> wrote:

@sapanil. Previously i used server alias for sub domain. I replaced with the specific subdomain. still having same screen of manage database.

--
Anil Kesariya
Sent by Odoo Inc. using Odoo about Forum Post False

Anil Kesariya
Autor

@swapnil I am not using service file to start openerp server. my openerp server is running manually.

Anil Kesariya
Autor

@swapnil I have gone through the main db filter method which is defined in openerp/http.py . In that method it using the httprequest.environ.get('HTTPHOST', '').split(':')[0] which should return the domain passed on browser. instead domain i am getting the ip address 127.0.0.1 and this value is manipulated get database. instead i modified the method and applied HTTP_X_FORWARDED_HOST instead HTTP_HOST h = httprequest.environ.get('HTTP_X_FORWARDED_HOST', '').split(':')[0] than it returns me the exact domain name eg. subdomain.localhost.com so it filter the correct data and return the filtered database list and works well. is it correct method to modified the code of odoo? or am I forgot anything to configure?

swapnil wagh

@Anil What you did is also ok, but when we use %d for db-filter in configuration it works, but as its filter the database it matches the subdoamin means if you have db like anil1 , anil2 and odoo and you use anil.domain.com it will show both db starts with anil except odoo in dropdown. So what you did is correct to get out from this issue. If you need any help from me I can help you to solve your subdomain issue.

Anil Kesariya
Autor

Thanks sure.

Avatar
Sarl
Beste Antwort

Hi all,

May be this help you.

We find a solution for use %h and subdomain, create your db in replace '.' by '-'.

Example : for the domaine erp.pharmacy.com, create db erp-pharmacy-com

And in your file .conf, at line dbfilter, write this : dbfilter = %h

Works for Odoo v8

2
Avatar
Verwerfen
Avatar
abraham
Beste Antwort

Header add X-ODOO_DBILTER "db-name"

RequestHeader add X-ODOO_DBFILTER "db-name"

please add these in apache2 configuration file to filter database

0
Avatar
Verwerfen
Avatar
Shivam Mahajan
Beste Antwort

Can you please    tell me how to configure multi domains foe multi companies in odoo9.........the help would be appreciated

0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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