After updating locations.conf nginx reload ...fail!


#1

I was following this doc on using Let’s Encrypt https://easyengine.io/tutorials/nginx/lets-encrypt-with-easyengine/

After allowing .well-known directory to be reachable in EasyEngine.

vim /etc/nginx/common/locations.conf

nginx reload fails

 $ sudo nginx -t && service nginx reload
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
 * Reloading nginx configuration nginx
   ...fail!

#2

You probably have a user / group ownership or user / group permissions issue with locations.conf


#3

Hello David,

it doesn’t look like it.

drwxr-xr-x 2 root root 4.0K Jan  3 12:04 .
drwxr-xr-x 8 root root 4.0K Jan  3 09:32 ..
-rw-r--r-- 1 root root  208 Jun 28  2015 acl.conf
-rw-r--r-- 1 root root 1.7K Jan  3 12:04 locations.conf
-rw-r--r-- 1 root root  236 Jun 28  2015 php.conf
-rw-r--r-- 1 root root  237 Jun 28  2015 php-hhvm.conf
-rw-r--r-- 1 root root 1.2K Jun 28  2015 w3tc.conf
-rw-r--r-- 1 root root 1.2K Jun 28  2015 w3tc-hhvm.conf
-rw-r--r-- 1 root root 1.3K Jun 28  2015 wpcommon.conf
-rw-r--r-- 1 root root 1.3K Jun 28  2015 wpfc.conf
-rw-r--r-- 1 root root 1.3K Jun 28  2015 wpfc-hhvm.conf
-rw-r--r-- 1 root root 1.2K Jun 28  2015 wpsc.conf
-rw-r--r-- 1 root root 1.2K Jun 28  2015 wpsc-hhvm.conf
-rw-r--r-- 1 root root  358 Jun 28  2015 wpsubdir.conf

#4

Hey There,

Interesting, what’s in locations.conf and nginx.conf?

Just double check you don’t have any strange lines or control chars.


#5

Thanks David

contents of locations.conf is exactly https://github.com/EasyEngine/easyengine/blob/master/ee/cli/templates/locations.mustache

contents of nginx.conf is exactly https://github.com/EasyEngine/nginx-build/blob/master/nginx/debian/conf/nginx.conf

any other ideas?


#6

Still have no idea why this is not working? Any assistance would be great.

I notice the easyengine article has been taken down?


#7

With EE 3.4.0 you don’t need any hacks to enable HTTP/2.

However, EE does not provide ALPN yet, what makes HTTP/2 kinda useless (as much as I can tell).


#8

Thanks @janiosarmento just this morning realised that v3.4.0 comes with built in support for Let’s Encrypt.

Still could not solve why nginx reload fails - So just moved to a new EC2 instance. Thats the benefit of easyengine, its so quick!


#9