Results 1 to 9 of 9

Thread: "./build nginx" fails on nginx restart

  1. #1
    Join Date
    Jan 2018
    Posts
    5

    Exclamation "./build nginx" fails on nginx restart

    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

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,133
    Hello,

    Try

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

    and let us know your results.

  3. #3
    Join Date
    Jan 2018
    Posts
    5
    Quote Originally Posted by zEitEr View Post
    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

  4. #4
    Join Date
    Aug 2015
    Posts
    302
    Show what is inside /etc/nginx/nginx-vhosts.conf
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  5. #5
    Join Date
    Jan 2018
    Posts
    5
    Quote Originally Posted by Awd View Post
    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

  6. #6
    Join Date
    Jan 2018
    Posts
    5
    Quote Originally Posted by Awd View Post
    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

  7. #7
    Join Date
    Aug 2015
    Posts
    302
    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 by Awd; 01-25-2018 at 12:13 PM.
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  8. #8
    Join Date
    Jan 2018
    Posts
    5
    Thank you all.

    Fixed with ./build update_script and further suggested actions.

  9. #9
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,133
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •