it-projects-llc / odoo-saas-tools

Odoo SaaS Tools — tools for SaaS Businesses. Sale and manage Odoo databases.
https://saas.it-projects.info
GNU Lesser General Public License v3.0
542 stars 577 forks source link

after create server database, unable to open the server site. #824

Open elliotxin opened 5 years ago

elliotxin commented 5 years ago

I used docker install the odoo11 saas, after that i fellow this instruction "https://odoo-saas-tools.readthedocs.io/en/11.0/setup/install.html" manual setting. I was created the main database name same with my domain(example.com) after that i enter the example.com to the browser and enable open the odoo backend login page, and install the saas_portal. After this step, i created s1.example.com database,and enter s1.example.com to browser, then can not open the website. my /etc/nginx/conf.d/portal.conf setting like this:

server {
    listen 80;
    #rewrite ^/.*$ https://$host$request_uri? permanent; #Uncomment this line in case you want to use https only
    server_name example.com *.example.com;

    if ($host ~* ^([^\.]+)\.([^\.]+\.[^\.]+)$) {
         set $subdomain $1;
         set $domain $2;
     }

    #include odoo_params;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    location /longpolling {
        proxy_pass http://82.96.56.23:8072;
    }
   location / {
        proxy_pass http://82.96.56.23:8069;
    }

    location ~* /web/static/ {
        proxy_cache_valid 200 90m;
        proxy_buffering    on;
        expires 864000;
        proxy_pass http://82.96.56.23:8069;
    }

my odoo config like this:

[options]
addons_path = /mnt/odoo-source/odoo/addons,/mnt/odoo-source/addons,/mnt/addons/OCA/account-closing,/mnt/addons/OCA/account-financial-reporting,/mnt/addons/OCA/account-financial-tools,/mnt/addons/OCA/account-inv$
admin_passwd = pass123
data_dir=/mnt/data-dir

dbfilter = ^%h$

server_wide_modules = web,base_session_store_psql
workers = 0

limit_time_cpu = 600
limit_time_real = 1200
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/67971985-after-create-server-database-unable-to-open-the-server-site?utm_campaign=plugin&utm_content=tracker%2F3643037&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F3643037&utm_medium=issues&utm_source=github).