Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
12557 Lượt xem

I've just started to use Openerp and I ran into this problem: I don't know how to turn that domain into that url, I want that everytime a client enters to http://myserver.com it redirects to the other url with that database "mydb" is there a way to do that with just Openerp8 or I need an Apache in between.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I think this is Apache's business. Try this link: http://stackoverflow.com/questions/8541182/apache-redirect-to-another-port

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In addition Specifically regarding to openerp you need to deploy openerp using mod_proxy. Check this blog post for more details http://tinyurl.com/pztrfvh

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

To remove the need for ?db=mydb, you will have to run your server in Single Database Mode by adding the argument `--db-filter=mydb` when starting the server.

You are also supposed to be able to set the database filter in the config file but it doesn't always work perfectly for single database mode. The parameter is `dbfilter = mydb`

To remove the port, you would need to run the server on port 80. You can specify the port by adding the arguement `--xmlrpc-port=80` when starting the server. You can also change the port from 8069 to port 80 in the config file. The parameter is `xmlrpc_port = 80`.

Another way to use port 80 if you are behind a router or firewall is to have your router/firewall forward port 80 to port 8069 of your server. This will only work for connections coming in from outside.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

To do that, you need to make a reverse-proxy. It is not very difficult (or yes ;-) to do it with Apache, or another webserver that has that kind of feature.

For Apache you need to install mod_proxy and add a little bit of configuration. Your customers will continue see the original URL, but internally Apache will redirect that connection to the new URL, without changing the cutomer browser's URL. That is the best option.

Take a look at these sites to get more information:

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Alternativelly, you can make a redirect that visibly will change the user browser's URL, but I don't recommend you that way because it is less clean and exposes your real configuration to the word, and you will need to open a new port, 8069, to accept public connections.

To do that, you need to install mod_rewrite and add a little bit of configuration:

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 24
2128
5
thg 7 25
16313
3
thg 3 20
6989
1
thg 5 25
831
0
thg 11 24
1458