β

odoo 12 更改端口8069 到80的解决方法

老实人 84 阅读

试过很多方法都不行,最终通过Apache 实现

首先安装odoo12 到Ubuntu

使用一键安装

odoo 12 最新一键安装包,亲测可用

然后使用以下代码安装apache2

Apache installation

Check whether Apache is already installed and running on your server. You can do this with the following command:

dpkg -l apache2

If Apache is not installed, you can do this by executing the following commands.

apt-get install apache2

After the installation is complete, you should enable Apache to start automatically upon server boot with:

systemctl enable apache2

You can also check the status of your Apache service with the following command:

systemctl status apache2

Now that we are sure that Apache is installed and running on our server we can continue with the next step and set up an Odoo reverse proxy.

To the next step, we will need to enable some additional proxy modules for Apache. To enable these modules, execute the following commands:

a2enmod proxy
a2enmod proxy_http

Once this is done, open a new configuration file using nano or your favorite text editor  with the following command:

nano /etc/apache2/sites-available/your_domain.conf

Add the following lines:

<VirtualHost *:80>
ServerName your_domain.com
ServerAlias www.your_domain.com

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://your_domain.com:8069/
ProxyPassReverse / http://your_domain.com:8069/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>

Enable “your_domain.conf” configuration in Apache using:

ln -s /etc/apache2/sites-available/your_domain.conf /etc/apache2/sites-enabled/your_domain.conf

Remember to replace your ‘your_domain.com’ with your actual domain name. Save the changes and restart the Apache web server for the changes to take effect:

service apache2 restart
作者:老实人
我的一生都在做一个产品,那就是我自己!
原文地址:odoo 12 更改端口8069 到80的解决方法, 感谢原作者分享。

发表评论