I have nginx installed in my server as the default server as a proxy server and listen to port 80 and 443 and apache is listening on port 8080 and 8443. The way it works is all traffic connects to the nxing server then that hands it off to the apache server to load the websites. You can install nginx on a cPanel server long as you configer it correctly and install these packages mod_rpaf and mod_remoteip for Apache and set the nginx to pass off the connections to apache but setting nginx conf port to apachy ports like it shown below.
Code:
proxy_pass $scheme://$PROXY_DOMAIN_OR_IP:$PROXY_TO_PORT;
and you would add this in the nginx http/https server conf file
Code:
set $PROXY_DOMAIN_OR_IP $host;
set $PROXY_TO_PORT 8080;
or
Code:
set $PROXY_DOMAIN_OR_IP $host;
set $PROXY_TO_PORT 8443;
Yes there is more to this to set it up but it can be done and i have it working on my server but with a 3nd party repo that installs the nginx server and compiles a new version of openSSL with it. But i want to get rid of the 3nd party repo and do it with the nginx and openssl sources from their websites.
You can see for your self that i have nginx install and being used in my cPanel server if you do a header check on this site my-hosted-website.com and the page will load with no problems.
cPanel can easily add nginx as a proxy server on top of the apache server and still be able to use EA3 or EA4 in WHM but they chose not to.
If there is a will there is a way in linux and there is a plugin you can get for free to install nginx in cPanel/WHM at
https://engintron.com but it will compile the nginx to use the stuff that cPanel already installed like OpenSSL 1.0.1e
I wanted to make my own repo that installs the new versions of nginx and openssl and compile the new version of openssl with nginx. But i am not sure how to install a second openssl as a private openssl for nginx and compile it with it. I know well installing nginx i can use this command to compile the openssl to it.
Code:
./configure --with-http_ssl_module --with-openssl=/path/to/openssl-1.0.1e
I also been reading can i do something like this?
Code:
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar -xzvf openssl-1.0.1g.tar.gz
Then when i run the nginx install i would do something like this and will it work?
Code:
./configure --with-http_ssl_module --with-openssl=/path/to/openssl-1.0.1g