Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Subdomain filtering databases does not work

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
db_filtersubdomainapache2odooV8
3 Replies
8967 Tampilan
Avatar
Andrius Laukavičius

I'm trying to configure domain in a way, so I could use subdomain for accessing database. For example if my domain is `domain.com` and I have databases `demo` and `demo2`. Then I should be able to access it by writing `demo.domain.com` and `demo2.domain.com`. But none of this work. I followed this guide: http://opensourceholic.com/2014/05/09/deploy-openerp-using-mod_proxy-and-mod_wsgi-on-linux-server/

After doing everything by the guide, what I was able to do, was I can only access Odoo web by writing `domain.com`, but if I write `demo.domain.com`, I will only get this message `This webpage is not available`.

So what I did:

My apache2 configuration files:

`openerp.conf`

    <VirtualHost *:80>
        ServerName domain.com
        ServerAlias *.domain.com // 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://domain.com:8069/
        ProxyPassReverse / http://domain.com:8069/
        ProxyVia On
        LogLevel warn
    </VirtualHost>

`openerp-wsgi.conf`:

    <VirtualHost *:80>
        ServerName domain.com
        ServerAlias *.domain.com // Use this if you want dbfillter on subdomain
        WSGIScriptAlias / /opt/openerp/server/openerp-wsgi.py
        WSGIDaemonProcess oe user=user group=oerp processes=2 python-path=/opt/openerp/server/ display-name=apache-openerp
        WSGIProcessGroup oe
        ErrorLog /var/log/openerp/openerp-error.log
        CustomLog /var/log/openerp/openerp-access.log combined
        <Directory /opt/openerp/server>
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>

My `openerp-wsgi.py` configuration:

    import openerp
    
    #----------------------------------------------------------
    # Common
    #----------------------------------------------------------
    openerp.multi_process = True # Nah!
    
    # Equivalent of --load command-line option
    openerp.conf.server_wide_modules = ['web']
    conf = openerp.tools.config
    
    # Path to the OpenERP Addons repository (comma-separated for
    # multiple locations)
    
    conf['addons_path'] = '/opt/openerp/server/addons/,/opt/openerp/server/openerp/addons/'
    
    # Optional database config if not using local socket
    #conf['db_name'] = 'demo'
    conf['db_host'] = '127.0.0.1'
    conf['db_user'] = 'user'
    conf['db_port'] = 5433
    conf['db_password'] = 'password'
    #conf['dbfilter'] = '%d'
    #----------------------------------------------------------
    # Generic WSGI handlers application
    #----------------------------------------------------------
    application = openerp.service.wsgi_server.application
    
    openerp.service.server.load_server_wide_modules()
    
    #----------------------------------------------------------
    # Gunicorn
    #----------------------------------------------------------
    # Standard OpenERP XML-RPC port is 8069
    bind = '0.0.0.0:8069'
    pidfile = '.gunicorn.pid'
    workers = 4
    timeout = 240
    max_requests = 2000

And even after doing this, it still was not working, so I added this line in /etc/hosts:

`127.0.0.1 domain.com` Then I was able to access OpenERP when entering domain.com address, but only this. If I add suggested filter (either directly in config file or in openerp-wsgi.py file), then system does not find any database and I can't access any of it, even in the list not to mention the main reason I'm doing this to access by subdomain (as written in an example).

So what is wrong here?

Note. I'm trying this on Odoo v8. 

1
Avatar
Buang
Avatar
Andrius Laukavičius
Penulis Jawaban Terbai

I figured I need to manually enter every subdomain in /etc/hosts, only then it starts working I expect.

1
Avatar
Buang
Avatar
swapnil wagh
Jawaban Terbai

Hi Andrius Laukavičius,

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.

 

7
Avatar
Buang
Avatar
Andrius Laukavičius
Penulis Jawaban Terbai

I figured I need to manually enter every subdomain in /etc/hosts, only then it starts working I expect.

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
[Odoo 8.0 - apache2] How to configure a proxy from an url to a specific database, in a multi-database setup ? Diselesaikan
apache2 odooV8
Avatar
Avatar
12
Nov 23
18723
Odoo on different URL Path
apache2 odooV8
Avatar
0
Mei 15
5464
Odoo Apache2 SSL connection Glitch
ssl apache2 odooV8
Avatar
Avatar
1
Apr 16
6163
Why SSL Subdomain dbfilter not working ? Diselesaikan
database ssl db_filter subdomain
Avatar
Avatar
2
Nov 19
8617
How to access database with sub subdomain in odoo? Diselesaikan
nginx db_filter hosting odooV8
Avatar
Avatar
1
Jan 16
10184
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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