<\/span><\/h2>\nIf you have a valid domain name and you would like to use it in order to access your Odoo application instead of typing the IP address and the port number in the URL, we will now show you how to set up a reverse proxy using the Apache web server.<\/p>\n
We will start by installing the Apache web server. Apache is considered as the most widely used web server software. It is fast, secure, reliable and can be easily customized depending on your needs.<\/p>\n
To install Apache on your server, run the following command:<\/p>\n
apt-get install apache2<\/pre>\nAfter the installation is complete, you should enable Apache to start automatically upon system boot. You can do that with the following command:<\/p>\n
systemctl enable apache2<\/pre>\nTo verify that Apache is running, open your web browser and enter your server IP address, (e.g. http:\/\/111.222.333.444). If Apache is successfully installed you should see a message saying “It works!”.<\/p>\n
Next, we will need to enable some additional proxy modules for Apache. You can do this with the following commands:<\/p>\n
a2enmod proxy\r\na2enmod proxy_http<\/pre>\nOnce this is done, open a new configuration file for your domain with the following command:<\/p>\n
nano \/etc\/apache2\/sites-available\/my_domain.conf<\/pre>\nAnd enter the following:<\/p>\n
<VirtualHost *:80>\r\nServerName my_domain.com\r\nServerAlias www.my_domain.com\r\n\r\nProxyRequests Off\r\n<Proxy *>\r\nOrder deny,allow\r\nAllow from all\r\n<\/Proxy>\r\n\r\nProxyPass \/ http:\/\/my_domain.com:8069\/\r\nProxyPassReverse \/ http:\/\/my_domain.com:8069\/\r\n<Location \/>\r\nOrder allow,deny\r\nAllow from all\r\n<\/Location>\r\n<\/VirtualHost><\/pre>\nEnable \u201cmy_domain.conf\u201d configuration in Apache using:<\/p>\n
ln -s \/etc\/apache2\/sites-available\/my_domain.conf \/etc\/apache2\/sites-enabled\/my_domain.conf<\/pre>\n