Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

configure the htaccess for my server

By
isio-odoo
on 4/29/16, 3:21 PM 482 views

Hello,

I want to configure the htaccess for my server, so when any one clic on the my_domaine:8069/web 

he give me popup asking for

htaccess (login, password)

i work with vps server with ubuntu as OS

0
Kazim Mirza
On 4/30/16, 1:27 AM

Hello

If you have set the .htaccess file for apache2  you need to set .htaccess password file. below is the sample code to use in .htaccess.


#set an environtment variable "auth" if the request starts with "/web" 
SetEnvIf Request_URI ^/web auth=1
AuthName "Please login to access backend!"
AuthType Basic AuthUserFile "/pathtoyour.htpasswd"
 
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
# then, deny only if required
Deny from env=auth

Thank youk kazim , can you explain more i have a vps server on it i install only the odoo !! how i should process ?

isio-odoo
on 4/30/16, 4:42 AM

OS is ubuntu

isio-odoo
on 4/30/16, 4:43 AM

You just need to add one file in /var/www/html folder Go to that folder and run command sudo nano .htaccess and then you need to place basic htaccess contains there you can use this http://www.htaccessredirect.net/ to generate it easily .

Kazim Mirza
on 4/30/16, 5:09 AM

I make my files under /var/www/html with this structure: FOR HTACCESS FILE #set an environtment variable "auth" if the request starts with "/web" SetEnvIf Request_URI ^/web auth=1 AuthName "Please login to access !" AuthType Basic AuthUserFile "/var/www/html/.htpasswd" Order Allow,Deny Satisfy any Allow from all Require valid-user # then, deny only if required Deny from env=auth FOR HTPASSWD aymen:kPMZE4nuXggHA But nothing is changed !! i don't know the pb excatly can you correct me Sir !

isio-odoo
on 4/30/16, 6:01 AM

i should activate the apache server or no ?

isio-odoo
on 4/30/16, 8:12 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/29/16, 3:21 PM
Seen: 482 times
Last updated: 4/30/16, 6:19 AM