2

I am running a Wordpress site on Google Compute Engine. It's Nginx and used to work correctly. After a server restart it no longer starts up Nginx. I receive :

nginx: [emerg] unknown "request_url" variable /opt/bitnami/nginx/scripts/ctl.sh: 77: [: Illegal number: /opt/bitnami/nginx/scripts/ctl.sh : Nginx could not be started

I have no idea even where to begin to look for the cause of the error. Any hints, tips, or flat out answers would be greatly appreciated!

NetApex
  • 23
  • 6

1 Answers1

1

As per @Alexey Ten said, correct variable is $request_uri Also you can check that this variable is not defined too late on nginx config file.

UPDATE:

Problem solved with restoring an existing image of GCE instance.

  • It's actually written $request_uri in my nginx-app.conf file. and it's the second line so I don't believe it's called too late. – NetApex Apr 15 '19 at 00:00
  • Did you checked if the service is started? `systemctl status nginx` If it's possible provide the output. – Albert Sunyer Apr 15 '19 at 14:53
  • It is not started (Unit nginx.service could not be found.) When I attempt to start the service is when I get the original error. – NetApex Apr 15 '19 at 17:17
  • Can you execute the following command in order to find if there is any reference to "request_url" in the code? `grep -rnw /opt/bitnami/nginx/ -e 'request_url'` – Albert Sunyer Apr 26 '19 at 09:13
  • Thanks Albert, but I gave up on the "correct" way and went the video game way. I remembered to save (often) so I removed the VM and loaded up a new one and restored onto it. So I don't know what caused it, or if it will happen again, but I am up and running for now. – NetApex Apr 27 '19 at 20:27
  • I've updated my answer @NetApex. – Albert Sunyer Apr 29 '19 at 14:03