nginxinc / nginx-ldap-auth

Example of LDAP authentication using ngx_http_auth_request_module
BSD 2-Clause "Simplified" License
681 stars 202 forks source link

nginx config failure #24

Closed adamyala closed 6 years ago

adamyala commented 6 years ago

I am going through the instructions on a fresh ubuntu 14 vagrant machine. Once the machine is spun up I run:

sudo apt-get update && 
sudo apt-get install -y nginx && 
sudo apt-get install -y python-ldap && 
sudo apt-get install -y git && 

git clone git@github.com:nginxinc/nginx-ldap-auth.git && 
sudo cp nginx-ldap-auth/nginx-ldap-auth.conf /etc/nginx/conf.d/ && 
sudo rm /etc/nginx/sites-enabled/default

per the instructions in the readme.

When I run sudo nginx -t I get the below error and can't proceed.

vagrant@logjam:~$ sudo nginx -t
nginx: [emerg] "error_log" directive is duplicate in /etc/nginx/conf.d/nginx-ldap-auth.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

Am I doing something incorrectly?

oxpa commented 6 years ago

This is the same problem as in #22 . Please, write your own configuration. The one provided in the repo is meant to be used as an example only.

adamyala commented 6 years ago

@oxpa Sure thing! Thank you for help.

Could a note be added to the readme explaining this? If multiple people are already making this mistake then surely more will make it in the future.