This guide will show you how to set up a webserver (Apache) and point your domain to your Odoo application.
1. Install Apache on Your Server
Update system packages:
sudo apt-get update
Install apache:
sudo apt-get install apache2
2. Enable Proxy Modes in Apache
sudo a2enmod proxy proxy_http
Restart Apache:
sudo systemctl restart apache2
3. Add a New Conf File for Your Domain
Create and open the configuration file in the sites-available Apache directory:
sudo nano /etc/apache2/sites-available/<domain-name>.conf
Add the following configuration to the file:
<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>
5. Enable the Site You Created
sudo a2ensite <domain-name>.conf
6. Restart Apache
sudo service apache2 restart
7. Make Changes to the /etc/hosts File
Open the hosts file:
sudo nano /etc/hosts
Add the following line to the file:
127.0.0.1 <domain-name>
Congratulations, you can now access Odoo by entering your domain name and the appropriate port into a browser.