Community mailing list archives

community@mail.odoo.com

Re: How to Set domain on odoo website ??

by
redCOR AG, robert rottermann
- 05/08/2016 03:47:17
Mihir,
On 08.05.2016 09:01, mihir shah wrote:
Dear Community,


My current odoo server is running on live IP i.e http://59.99.225.46:8069/

But i want to  set domin i.e bombaygroup.in on this IP so when ever anyone types bombaygroup.in in url  its should open odoo server link.

and IP address should be hidden only bombaygroup seen.
you need a web server (apache or nginx) on your server which is configurated to redirect incomming calls to your odoo server.
this is how you do it for apache:

1. make sure apache is installed.
    you can do so by navigating to the following url in your browser:
        http://59.99.225.46    (no port!)
    you should get a greeting page that says that apache i installed.
    If  nothing is displayed you have to continue installing apache
    If a greating page is displayed, but not titled something like "Apache2 Ubuntu Default Page" some other webserver
    is running on your server and the following does not work for you.
2. on your server (
59.99.225.46 ) you create the following file:
    /etc/apache2/sites-available/bombaygroup.conf
    add the following content to this file:
# bombaygroup.in
# -------------------
#_robert_
<VirtualHost *:80>
    DocumentRoot /var/www/
    ServerAdmin robert@redcor.net
    ServerName  www.bombaygroup.in
    ServerAlias bombaygroup.in
    CustomLog   /var/log/apache2/bombaygroup-access.log combined
    ErrorLog    /var/log/apache2/bombaygroup-error.log
    LogLevel warn

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On
    <IfModule mod_rewrite.c>
      RewriteEngine On

        <Proxy *>
                Order deny,allow
                #deny from all
                allow from *.bombaygroup.in
        </Proxy>

        <ProxyMatch http://176.9.142.21:[0-9]{2,}?[8|9]0/.*>
                Order deny,allow
                Allow from all
        </ProxyMatch>

      RewriteRule ^/(.*) http://localhost:8069/$1 [R,L,P]
    </IfModule>

</VirtualHost>

3. again on your server you need to add a softlink from
    /etc/apache2/sites-available/bombaygroup.conf
    to
    /etc/apache2/sites-enabled/bombaygroup.conf

    this is done like this:
    ln -s     /etc/apache2/sites-enabled/bombaygroup.conf /etc/apache2/sites-available/bombaygroup.conf

3.a you will need to add some apache modules to enable apache to redirect:
    as user root execute:
       a2enmod proxy
       a2enmod proxy_http
       a2enmod ssl
       a2enmod rewrite

4. restart your apache:
    apache2ctl restart

5. you migth want to close port 8069 in your firewall

robert






 
-- 
Regards 
Mihir Shah

*Please Don't print this email unless you really need to "Save Earth and Save Environment" 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe