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

Try this

Code:
chmod 755 /home/*/domains/*/public_html

and update us with results.

It doesn't work. So sad :(

And when i rewrite_confs, i got this problem

Code:
Starting nginx: nginx: [warn] conflicting server name "xxxx.xx" on xxx.xxx.237.91:80, ignored
nginx: [warn] conflicting server name "xxxx.xx" on xxx.xxx.237.91:443, ignored

The thing is, i got multi domains pointed with this domain xxxx.xx, and problem happend.

But with another domain that doenst point with anyone, nginx proxy works like a charm.

Hope you can understand me, my english is bad :(
 
I having domain xxx.xx and sub img.xxx.xx. Problem is when using nginx proxy, the sub folder of the host could not be load. For ex, i got

Code:
http://xxx.xx/image

and it says 404 not found nginx.

>>>>> Problem solved, beause i set dns of my account as the same with domain, so it conflicted. When i change the dns , errros gone.

Thanks for your attention. :D
 
Last edited:
problem

Hi

I tried using custombuild to have nginx as proxy.
Besides the typo in the command (am i really the only one?)

cd /usr/local/directamin/custombuild (***/directadmin/c***
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs

I get an error

Starting nginx: nginx: [emerg] open() "/usr/local/directadmin/data/users/nobody/nginx_php.conf" failed (2: No such file or directory) in /usr/local/directadmin/

Reverted and using apache again, but i cant understand why, well i dont have a user nobody in the dir above but i supose that config file would be created inclusing the dir while installing
 
Dear admin,

I have been set up nginx+apache in following:
./build nginx_apache
./build rewrite_confs
After finish, Virtual host don't change to port 8080 in /usr/local/directadmin/data/users, and i have error "nginx is functioning normally" when access website. I don't know what to do, please help me.

Thanks!

i have same problem in 1 domain of server !!!
all of that have good but 1 of my domain have SSL show "nginx is functioning normally"


i use this code and reply :
Code:
[root@direct custombuild]# ls -la /usr/local/directadmin/data/templates/custom/*
total 28K
drwx--x--x 2 diradmin diradmin 4.0K Jan 28 12:14 .
drwx--x--x 3 diradmin diradmin 4.0K Jan 28 12:14 ..
-rw-r--r-- 1 diradmin diradmin  279 Jan 28 03:53 redirect_virtual_host.conf
-rw-r--r-- 1 diradmin diradmin 4.3K Jan 28 03:53 virtual_host2.conf
-rw-r--r-- 1 diradmin diradmin 4.4K Jan 28 03:53 virtual_host2_sub.conf


but all files are empty !
 
Hello,

Reverted and using apache again, but i cant understand why, well i dont have a user nobody in the dir above but i supose that config file would be created inclusing the dir while installing

Thanks, typo is fixed now.

You probably have user nobody in directadmin. Check a full list of users in directadmin.
Do you have directory /usr/local/directadmin/data/users/nobody/ ?


i have same problem in 1 domain of server !!!
all of that have good but 1 of my domain have SSL show "nginx is functioning normally"

What is your directadmin version?

Code:
cd /usr/local/directadmin/
./directadmin o
./directadmin v
 
Hi

i dont have a user nobody in that dir if that a requirement the script should check that

[root@server directadmin]# ./directadmin o
Compiled on 'CentOS 6.0 64-Bit'
Compile time: Jun 27 2015 at 02:06:02 Compiled with IPv6 [root@server directadmin]# ./directadmin v
Version: DirectAdmin v.1.48.3
 
i dont have a user nobody in that dir

What do you see with:

Code:
grep nobody /usr/local/directadmin/data/users/*/users.list
?

if that a requirement the script should check that

No, it's not a requirement. Directadmin does not require user nobody for nginx virtual hosts as well as for apache and php.

[root@server directadmin]# ./directadmin o
Compiled on 'CentOS 6.0 64-Bit'
Compile time: Jun 27 2015 at 02:06:02 Compiled with IPv6 [root@server directadmin]# ./directadmin v
Version: DirectAdmin v.1.48.3

A part of my previous post about Directadmin version was for user drstreet.


mmm is that not a strange place for a server config file?

Not, it's not a strange. Directadmin thinks you've got the user nobody. So we need to find out where it's added.
 
As stetd i dont have the user nobody in that dir

[root@server directadmin]# grep nobody /usr/local/directadmin/data/users/*/users.list
[root@server directadmin]#
 
OK, and in what exactly file was there the inclusion of /usr/local/directadmin/data/users/nobody/nginx_php.conf ?
 
It seems Nginx is looking in that dir for a config file

cd /usr/local/directamin/custombuild (***/directadmin/c***
./build update
./build update_da
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs

I get an error

Starting nginx: nginx: [emerg] open() "/usr/local/directadmin/data/users/nobody/nginx_php.conf" failed (2: No such file or directory) in /usr/local/directadmin/
 
I mean what file does have

Code:
include [COLOR=#333333]/usr/local/directadmin/data/users/nobody/nginx_php.conf;
?

run this code to find out it:

Code:
[/COLOR]grep -R include /etc/nginx/ -R | grep nobody
 
I mean what file does have

Code:
include [COLOR=#333333]/usr/local/directadmin/data/users/nobody/nginx_php.conf;
?

run this code to find out it:

Code:
[/COLOR]grep -R include /etc/nginx/ -R | grep nobody

No result but from the error to me it seems nginx is looking at that dir for its config file
 
[root@server directadmin]# grep -R include /usr/local/directadmin/ -R | grep nobody /usr/local/directadmin/data/users/username/nginx.conf: include /usr/local/directadmin/data/users/nobody/nginx_php.conf; /usr/local/directadmin/data/users/username/nginx.conf: include /usr/local/directadmin/data/users/nobody/nginx_php.conf; [root@server directadmin]#
 
Did you have nginx installed before? What if you remove or rename /etc/nginx/ and reinstall nginx ?

never had it installed before as far as i know it, smth interesting perhaps:

[root@server directadmin]# grep -R include /usr/local/directadmin/ -R | grep nobody /usr/local/directadmin/data/users/username/nginx.conf: include /usr/local/directadmin/data/users/nobody/nginx_php.conf; /usr/local/directadmin/data/users/username/nginx.conf: include /usr/local/directadmin/data/users/nobody/nginx_php.conf; [root@server directadmin]#

I will delete that etc/nginx folder if its there, would following your howto not install nginx for me?
 
I've never seen such an issue before. If you need nginx to run just now you might want to create the empty file /usr/local/directadmin/data/users/nobody/nginx_php.conf.

Did you hide a real user name with username? Do you have only two users on the server? Or more? Do the other users have inclusions of the file?
Any custom templates in
/usr/local/directadmin/data/templates/custom ?
Any custom code in httpd section of directadmin (admin level) for domains of those users?
 
I've never seen such an issue before. If you need nginx to run just now you might want to create the empty file /usr/local/directadmin/data/users/nobody/nginx_php.conf.

Did you hide a real user name with username? Do you have only two users on the server? Or more? Do the other users have inclusions of the file?
Any custom templates in
/usr/local/directadmin/data/templates/custom ?
Any custom code in httpd section of directadmin (admin level) for domains of those users?

I dont need it but wanted it to see the effect
there are 20 users on the server
i have no user with username )) never had one
other user do not have that inclusion and i figured your script did that
i do have custom templates for dns and such
"Any custom code in httpd section" i dont think so, i put custom stuff in the users http config file
 
Back
Top