:: NGINX: [emerg] directive "rewrite" is not terminated by ";"

20 sec read

:: Error when reload / restart nginx

nginx -s reload
nginx: [emerg] directive "rewrite" is not terminated by ";" /etc/nginx/vhost/blackonsole.org.conf:15

in line 15 use { and } characters in the regular expressions conflict with the block delimiter of the Nginx configuration file syntax language, some like:

rewrite ^/([0-9A-Za-z]{12})(/.+|.html?|$)       /cgi-bin/index.cgi last;

If you want to write a regular expression pattern that includes curly brackets, you need to place the pattern between quotes (single or double quotes)

rewrite "^/([0-9A-Za-z]{12})(/.+|.html?|$)"       /cgi-bin/index.cgi last;

 
:: Links
+ Google
+ Ivorde

How to fix problem with the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
Sysadmin.ID
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
Sysadmin.ID
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
Sysadmin.ID
15 sec read

3 Replies to “:: NGINX: [emerg] directive "rewrite" is not terminated by…”

Leave a Reply

Your email address will not be published. Required fields are marked *