[BUG-RC6] nginx rewite_confs

MtK

Verified User
Joined
Aug 2, 2007
Messages
412
Hey,
if custom/nginx is used, when running ./build rewrite_confs the variables (i.e |IP|) do not get replaced cause:
Code:
# cp configure/nginx/ custom -rf
# ./build rewrite_confs
Using 81.218.71.210 for your server IP
Gracefully shutting down php-fpm54:  done
Starting php-fpm54:  done
Gracefully shutting down php-fpm53: . done
Starting php-fpm53:  done
Restarting nginx.
nginx: [emerg] host not found in "|IP|:80" of the "listen" directive in /etc/nginx/nginx.conf:46
nginx: configuration file /etc/nginx/nginx.conf test failed
 
also this:
Code:
                       fastcgi_pass unix:/usr/local/php55/sockets/webapps.sock;
 
Just updated to NGINX 1.4.7 and this is still not solved:
Code:
nginx: [emerg] host not found in "|IP|:80" of the "listen" directive in /etc/nginx/nginx.conf:74
nginx: configuration file /etc/nginx/nginx.conf test failed
 
You must be having custom configuration files in /usr/local/directadmin/custombuild/custom/nginx with |IP| inside?
 
Run into the same problem. I ran ./build update, replaced my templates, and still the same error occured.

The nginx vhosts are fine after a ./build rewrite_confs.

This file: /usr/local/directadmin/custombuild/configure/nginx/conf/nginx.conf (or in the custom folder)

The follow part is not replaced by the correct IP / port.
server {
listen |IP|:|PORT_80|;
server_name $hostname |IP|;

After rewrite_confs, nginx.conf contains "|IP|:|PORT_80|"
 
Do you have it in the configure or the custom folder? If that's in custom, then it doesn't replace them. I am not able to reproduce your problem.

Code:
[root@test1 custombuild]# ./build rewrite_confs
Using 69.162.xxx.xx for your server IP
Using 69.162.xxx.xx for your server IP
Checking to ensure /etc/nginx/ssl.crt/server.ca is set.
Gracefully shutting down php-fpm53: . done
Starting php-fpm53:  done
Gracefully shutting down php-fpm53: . done
Starting php-fpm53:  done
Restarting nginx.
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]
 
Ok, it seems that I missed the point of the custom folder. I just copied all my configure files to the custom folder. I expected it to handle the custom folder exactly like the configure folder.
 
I've changed the CustomBuild script to change the |IP| and |PORT| tokens in custom configs too, that will be available from the next release of CB 2.0. Thank you for the requests/reports.
 
I've changed the CustomBuild script to change the |IP| and |PORT| tokens in custom configs too, that will be available from the next release of CB 2.0. Thank you for the requests/reports.
GREAT!
can we test it somehow...?
 
Back
Top