Community mailing list archives

community@mail.odoo.com

RE: Website root directory

by
Qingdao Oudu Software Co.,Ltd, Cui Jianping / Jason
- 10/17/2016 02:18:31

Since others may be interested in this topic, I’d be glad to share what I’ve done. Those who already know may simply ignore it.

 

Firstly upload the file (say, abc.txt) to a reachable web folder, for instance, ~/addons/web/static/, then test if you can open the file by http://domain/web/static/abc.txt . Continue to next step if this succeeds, otherwise check why it fails here.

 

Secondly modify the nginx config file, and add the following to the server definition section to the file:

    server {

        listen       80;

        # *******

 

        location /abc.txt {

            root  path_to_your_odoo_code/addons/web/static/;

           }

 

       # other parameters omitted

    }

[meaning: for those who wants to reach http://domain/abc.txt, nginx will direct the URL actually to path_to_your_odoo_code/addons/web/static/abc.txt. Thus, the client will receive the file http://domain/web/static/abc.txt in the end.]

 

Reload the nginx cnfig file, and the client is now able to get what is expected.

 

Regards,

 

Jason

 

From: Andreas Becker [mailto:andi@lisandi.com]
Sent: Monday, October 17, 2016 1:12 PM
To: Community <community@mail.odoo.com>
Subject: Re: Website root directory

 

For the records and other people struggeling with the same problem it would be very helpful if you would post your solution here instead of keeping it a secret for yourself and say "Hi I solved it!" 

Inspire to share should be the way to teach others your solutions!

Looking forward to see your solution with Nginx

Thanks

Andi


 

With kind regards,
Mit freundlichen Grüßen,
Con un cordial saludo,
Cordialement,
с сердечным приветом,
เรื่องที่เกี่ยวกับชนิด,
與親切的問候,

图像已被发件人删除。 ANDI BECKER

CEO/General Manager LisAndi Co., Ltd.

--------------------------------------------------

LisAndi Co. Ltd., Phuket, Thailand (lisandi.com)

15/21 M.2 Viset Road, Rawai, Muang, Phuket, Thailand 83130

Mobile: +66 (0)81 606 3378

VoIP:   +49 (0)711 50 88788 50

Fax:     +49 (0)711 50 88788 50

Skype:          lisandi

Facebook:     andibecker

Google Talk/Facetime/eMail:  andi@lisandi.com

--------------------------------------------------

 

On Sun, Oct 16, 2016 at 9:07 AM, 崔建平 <jason@qdodoo.com> wrote:

Thanks, Stefa. Ive managed to achieve by using nginx.

 

Jason

 

From: Stefan Becker [mailto:ich@funbaker.de]
Sent: Thursday, October 13, 2016 7:00 PM
To: Community <community@mail.odoo.com>
Subject: Re: Website root directory

 

Hello Jason,

 

this should be configured in the webserver / reverse proxy.

 

Am Donnerstag, den 13.10.2016, 05:34 +0000 schrieb 崔建平:

> Hi community,

>  

> Some websites require their peers to store an verification file under the root

> directory. For example, a site check if its peer has the file www.peersite.com

> /verfication_file.txt for verification purpose. For Odoo, where will this

> verification file to be kept for visitors to fetch?

>  

> Thanks.

>  

> Jason

> _______________________________________________

> Mailing-List: https://www.odoo.com/groups/community-59

> Post to: mailto:community@mail.odoo.com

> Unsubscribe: https://www.odoo.com/groups?unsubscribe

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

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

 

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