"./build nginx" fails on nginx restart

SergeyB

New member
Joined
Jan 25, 2018
Messages
5
Hi,

I receive the following error on ./build update ./build nginx

Restarting nginx.
Starting nginx: nginx: [emerg] unknown directive "|LINKEDIP|" in /etc/nginx/nginx-vhosts.conf:7
[FAILED]

And the same for |LINKEDIPSSL| and |SPACE_HTTP2|.

Could you please suggest anything?

My nginx version: nginx/1.13.6
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,854
Location
GMT +7.00
Hello,

Try

Code:
./build update
./build update
./build update_da
./build rewrite_confs

and let us know your results.
 

SergeyB

New member
Joined
Jan 25, 2018
Messages
5
Hello,

Try

Code:
./build update
./build update
./build update_da
./build rewrite_confs

and let us know your results.
I've tried, but
service nginx configtest
nginx: [emerg] unknown directive "|LINKEDIP|" in /etc/nginx/nginx-vhosts.conf:7
nginx: configuration file /etc/nginx/nginx.conf test failed
 

Awd

Verified User
Joined
Aug 9, 2015
Messages
316
Show what is inside /etc/nginx/nginx-vhosts.conf
 

SergeyB

New member
Joined
Jan 25, 2018
Messages
5
Show what is inside /etc/nginx/nginx-vhosts.conf
Code:
cat /etc/nginx/nginx-vhosts.conf
    server {
        listen       [hidden_IP]:80;
	listen		[hidden_IP:]:80;
        listen       127.0.0.1:80;
        #listen       [::1]:80;
|LINKEDIP|
        server_name  $hostname  [hidden_IP];

        root   /var/www/html;
        index  index.html index.htm index.php;

        include /etc/nginx/nginx-userdir.conf;
	
        # Pass all .php files onto a php-fpm/php-fcgi server.
        location ~ \.php$ {
                try_files $uri =404;
 
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include /etc/nginx/fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass unix:/usr/local/php55/sockets/webapps.sock;
        }
		
        include /etc/nginx/nginx-info.conf;
        include /etc/nginx/webapps.conf;
    }

    # HTTPS server
    #
    server {
        listen       [hidden_IP]:443 ssl|SPACE_HTTP2|;
        listen       127.0.0.1:443 ssl|SPACE_HTTP2|;
        #listen       [::1]:443 ssl|SPACE_HTTP2|;
|LINKEDIPSSL|
        server_name  $hostname [hidden_IP];

        ssl			on;
        ssl_certificate		/etc/nginx/ssl.crt/server.crt.combined;
        ssl_certificate_key	/etc/nginx/ssl.key/server.key;

        root   /var/www/html;
        index  index.html index.htm index.php;

        include /etc/nginx/nginx-userdir.conf;

        # Pass all .php files onto a php-fpm/php-fcgi server.
        location ~ \.php$ {
                try_files $uri =404;

                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include /etc/nginx/fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass unix:/usr/local/php55/sockets/webapps.sock;
        }

        include /etc/nginx/nginx-info.conf;
        include /etc/nginx/webapps.ssl.conf
 

SergeyB

New member
Joined
Jan 25, 2018
Messages
5
Show what is inside /etc/nginx/nginx-vhosts.conf
cat /etc/nginx/nginx-vhosts.conf
server {
listen [hidden_IP]:80;
listen [hidden_IP]:80;
listen 127.0.0.1:80;
#listen [::1]:80;
|LINKEDIP|
server_name $hostname [hidden_IP];

root /var/www/html;
index index.html index.htm index.php;

include /etc/nginx/nginx-userdir.conf;

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ \.php$ {
try_files $uri =404;

fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/usr/local/php55/sockets/webapps.sock;
}

include /etc/nginx/nginx-info.conf;
include /etc/nginx/webapps.conf;
}

# HTTPS server
#
server {
listen [hidden_IP]:443 ssl|SPACE_HTTP2|;
listen 127.0.0.1:443 ssl|SPACE_HTTP2|;
#listen [::1]:443 ssl|SPACE_HTTP2|;
|LINKEDIPSSL|
server_name $hostname [hidden_IP];

ssl on;
ssl_certificate /etc/nginx/ssl.crt/server.crt.combined;
ssl_certificate_key /etc/nginx/ssl.key/server.key;

root /var/www/html;
index index.html index.htm index.php;

include /etc/nginx/nginx-userdir.conf;

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ \.php$ {
try_files $uri =404;

fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/usr/local/php55/sockets/webapps.sock;
}

include /etc/nginx/nginx-info.conf;
include /etc/nginx/webapps.ssl.conf
 

Awd

Verified User
Joined
Aug 9, 2015
Messages
316
Where comes the |LINKEDIP| |LINKEDIPSSL| and |SPACE_HTTP2| from? That is causing the fault.

It seems that it is related to HTTP2, did you enable it through this guide?
https://www.directadmin.com/features.php?id=1884

Do you have http2=1 in the directadmin.conf?
 
Last edited:

SergeyB

New member
Joined
Jan 25, 2018
Messages
5
Thank you all.

Fixed with ./build update_script and further suggested actions.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,854
Location
GMT +7.00
Hmm... the commands:

Code:
./build update
./build update_da
should have updated custombuild script.

Anyway good to know it's fixed now.

|LINKEDIP| |LINKEDIPSSL|
Are defaults, so they are expected to exist. The question was why the TOKENS were not processed.
 
Top