配置nginx代理
server {
listen 80;
server_name odoo10.com;
proxy_set_header Host $http_host;
proxy_set_header X-Forward-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:8069;
}
location /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://127.0.0.1:8069;
}
error_log logs/odoo.error.log;
access_log logs/odoo.access.log;
}
配置postgresql
1.允许外网访问
修改配置文件,yum安装位于/var/lib/pgsql/9.5/data/
#postgresql.conf 数据库服务器参数
listen_addresses=’localhost’ 修改为
listen_addresses=’*’
#pg_hba.conf 数据库权限配置
增加:
host all all 192.168.1.0/24 md5
2.用户设置
sudo -u postgres psql
create USER www WITH PASSWORD '123456';
alter role www superuser;
3.重启数据库
service postgresql-9.5 restart