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

Thanks zEitEr!

Yes indeed I use PHP-FPM, instead of httpd.

I did a manual install of mod_security like I did on my old server. It works but I'm not sure it is properly configured for nginx. Is this possible with custom build?
It could be related to the problem I have using SSL. Or more likely is a nginx problem.

When viewing my site as http://subdomain.example.com all css, js and graphics are loaded.
When viewing my site as https://subdomain.example.com no css is loaded. js and graphics seems fine.

Edit: It seemed: "Use a symbolic link from private_html to public_html - allows for same data in http and https" was not set! I expected this to be set, but the user backup did not restore this setting. Problem solved.
 
Last edited:
I did a manual install of mod_security like I did on my old server. It works but I'm not sure it is properly configured for nginx. Is this possible with custom build?

As far as I know (at least the latest time I checked it), CustomBuild 2.x can install mod_security only for a standalone apache. It does not support mod_security for nginx. Probably it will be supported soon.
 
Hello,
I am using mod_qos and I saw that it uses main IP of my server not my clients IP .
Can I solve it using mod_rpaf?
Why Smtalk and DA did not add it to CB2?
P.S : I am using CB2+Nginx_Apache+PHP-FPM
Thanks for help
P.S: I saw this problem on server-status too.
 
Last edited:
Virtual host don't change to port 8080 in /usr/local/directadmin/data/users

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!
 
Hello,

Do you have custom httpd templates in /usr/local/directadmin/data/templates/custom/ ?

Code:
ls -la /usr/local/directadmin/data/templates/custom/*
 
problem with last update custombuild (2.0.0-RC7 (rev: 1283))

hello
we have using nginx+apache on our server and when update custombuild in last ver my site (whmcs) is damaged and not work.
i know for whmcs need ioncube loader and ioncube is installed but problem is not solve.
when i check all log for solve this problem i dont find anything but seem last php or apache update is damaged in last custombuild update.
note: all service is running.
help me please?
 
Hello,

You gave us not enough information even to make a little guess. So please either give us more information including texts of errors that you see there, or hire somebody from us to fix it for you.

last php or apache update is damaged

Nevertheless this might be understood as if your server fails to load full files and load them partly. If this is the case try to switch mirror with

Code:
./build set_fastest
./build update

and then rebuild nginx+apache+php:

Code:
./build nginx_apache
./build php
./build rewrite_confs

Related: http://help.directadmin.com/item.php?id=305
 
thanks zEitEr for help.
for more information about this problem i installed again new directadmin with fresh centos with cb2 and all part success intalled and running but this is not work for whmcs host.
wordepress and joomla and etc work correctly but whmcs not work and problem with apache+nginx

regard
 
Still there is no enough information for us. Post here all the errors which you see: both in your browser and and error logs, or a link to your whmcs installation. Without requested information here on the forums hardly can we help you.
 
If anyone faces this issue, there may be a second reason if you are using centos 7.
I dont know how but the main server address was accessible, while the host with a static IP was inaccessible before firing these commands.

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload


Another addition:

If you get a 504 Gateway Timeout.
Add these settings below http{

/etc/nginx/nginx.conf
Code:
proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;
 
Hi,
maybe it is not exactly the right thread to ask this question but lot of people who has this setup may face this issue so I decided to shoot to this thread.

I have successfully enabled SNI on our new server with nginx_apache setup. The accounts have been restored from an older server. When we browse the sites from desktop browsers ssl is fine.But android devices give ERR_CERT_AUTHORITY_INVALID error. The ca root certificates exists in the ssl setup for domains (restore from old apache server), however I still get this error. Are ca root certificates different for nginx then apache? Or is there anything else I need to do for root certificates on nginx_apache + SNI setup?

Thanks.
 
I'll reply my own question for future reference.
Basicly you dont need to change CA root certificate unless you transfer from apache to IIS. I had wrong ca bundles set on my vhosts, but only noticed that after transfers.
 
How does this work with ipv6?

I took a quick view at the nginx config in order to add listen [::]:80; directive for IPv6. But i noticed the config has the :MULTI_IP: variable. Does this includes the additional IP's?

If so shouldn't the code be changed to: listen [:MULTI_IP:]:80; ?

-Brian
 
What upgrade problems do you mean? To run nginx_apache you need to have webserver=nginx_apache in options.conf.
 
This is mostly working well but just to mention I had a problem with images displaying. Logs showed a no permission error for Nginx. I had to set the "domains" folder under the user home to 755. Then it worked. Hopefully I saved someone else some time.

And thank you for the release. I am sure you saved me a lot of time.
 
I see in the logs that an image file is in both Apache and Nginx logs. Shouldn't the static image file only be displayed by Nginx?

What changes do I need to make for that to be true?
 
Back
Top