Reverse-proxy NGINX + Apache on Directadmin powered server with CB 2.x

but the real error is

The requested URL /roundcube/nginx_static_files/roundcube/skins/larry/images/roundcube_logo.png was not found on this server.

you see it ? /roundcube/nginx_static_files
 
Please check:
Code:
grep -r '127.0.0.1' /usr/local/directadmin/data/templates/custom
grep -r '127.0.0.1' /usr/local/directadmin/custombuild/custom
 
[root@box10 html]# grep -r '127.0.0.1' /usr/local/directadmin/custombuild/custom

nothing

[root@box10 html]# grep -r '127.0.0.1' /usr/local/directadmin/data/templates/custom

found :
/usr/local/directadmin/data/templates/custom/dns_a.conf:localhost=127.0.0.1

informations : i use cagefs
 
Doesn't rewrite_confs fix the problem? Like:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build rewrite_confs
 
no.. really

i erase all /etc/nginx
i erase all /usr/local/directadmin/custombuild
i erase all /etc/httpd/conf/extra/

i get a new one copy of custombuild 2.0

cd /usr/local/directadmin/custombuild/
./build libtool ;
./build autoconf ;
./build automake ;
./build update_da ;
./build mysql ;
./build nginx_apache ;
./build php ;
./build ioncube ;
./build rewrite_confs ;

cagefsctl --force-update

and same problem.. but i remember to see this ok in the last week

but one things : its work if i put 127.0.0.1 into /etc/nginx/webapps.conf

so why you require to use main server ip if its working only on 127.0.0.1 ? :)

but i keep it into 127.0.0.1 for now.. but can you explain to me what problem i can get to use this way ?

thanks to you Martynas :)
 
If you have the following line in /etc/httpd/conf/extra/httpd-nginx.conf:
Code:
RemoteIPInternalProxyList /usr/local/directadmin/data/admin/ip.list

And /usr/local/directadmin/data/admin/ip.list has 67.215.11.18 in it, then there must no nginx server block serving requests for 67.215.11.18 (and instead of that, it serves 127.0.0.1, file /etc/nginx/nginx-vhosts.conf or any other related file).
 
[root@box10 custombuild]# nano /etc/httpd/conf/extra/httpd-nginx.conf
GNU nano 1.3.12 File: /etc/httpd/conf/extra/httpd-nginx.conf

LoadModule aclr_module /usr/lib/apache/mod_aclr2.so
AccelRedirectSet On
AccelRedirectSize 1k
RemoteIPHeader X-Client-IP
RemoteIPInternalProxy 127.0.0.1
RemoteIPInternalProxyList /usr/local/directadmin/data/admin/ip.list
 
If you have the following line in /etc/httpd/conf/extra/httpd-nginx.conf:
Code:
RemoteIPInternalProxyList /usr/local/directadmin/data/admin/ip.list

And /usr/local/directadmin/data/admin/ip.list has 67.215.11.18 in it, then there must no nginx server block serving requests for 67.215.11.18 (and instead of that, it serves 127.0.0.1, file /etc/nginx/nginx-vhosts.conf or any other related file).

Sorry, I do not understand you very well.

The IP of the server is in /data/admin/ip.list and configured in /nginx/nginx-vhosts.conf too. The ip.list is included by httpd-nginx.conf.
 
Last edited:
Petertjuh360, do you experience the same problem? If yes, would I be able to check it free of charge and then post here what was the problem? Thank you! :)
 
not sure to understand really

but its dangerous now ? with 127.0.0.1 in webapps.conf ?

No, it is not dangerous. However, setting it to 127.0.0.1 would report $_SERVER['SERVER_ADDR'] in PHP as 127.0.0.1, and not your external IP.
 
and on another server

i get this error

2014/09/26 05:02:24 [emerg] 413796#0: bind() to 69.172.201.208:80 failed (99: Cannot assign requested address)
2014/09/26 05:03:02 [emerg] 414823#0: bind() to 69.172.201.208:80 failed (99: Cannot assign requested address)
2014/09/26 05:03:15 [emerg] 417711#0: bind() to 69.172.201.208:80 failed (99: Cannot assign requested address)
2014/09/26 05:03:21 [emerg] 422864#0: bind() to 69.172.201.208:80 failed (99: Cannot assign requested address)

but how its possible if its not my ip ?

i deleted /etc/httpd/conf/
and /etc/nginx/

another place to verify ?

and i get always this...when i rewrited all

i think a old installation of danginx products..(but uninstalled) make problem with nginx_apache
 
Last edited:
Petertjuh360, please contact me on Skype or PM for that. I'll check it free of charge.
 
i have same problem with roundcube on apache_nginx
It only works with 127.0.0.1 in webapps.conf
 
I have the same problem.
I can't run roundcubemail from domain.com/roundcube (only SERVER_IP/roundcube work's fine). Images and another files dosen't work.

Address with domain:
http://flowsoft.pl/roundcube/

IP address
http://178.255.45.51/roundcube/

The same problem is with phpmyadmin (problem with js and images) :/
How to fix this problem? Please help.

Regards
 
Last edited:
Nginx could not start because of an old missing IP. Removing the IP in nginx.conf of the user helped!
 
Back
Top