Nginx on Apache
tar xf nginxadmin2.3-stable.tar
After you installed it go to WHM Tweak Settings > System > and change in the field Apache non-SSL IP/port [?] the value 80 to 8081 save the settings. now you need to enable in your firewall the port 8081.
Edit crontab via ssh with command:
Add this line to it:
*/15 * * * * /usr/sbin/tmpwatch -am 4 /tmp/nginx_client
Disallow an account to use Nginx
cp /etc/nginx/vhosts/yourdomain.com /etc/nginx/staticvhosts/yourdomain.com
open up /etc/nginx/staticvhosts/yourdomain.com
and in the location line remove |html|Htm and all ententions you wanna served via apache.
then in /etc/nginx/nginx.conf at the bottom, add include "/etc/nginx/staticvhosts/*";
rm -rf /etc/nginx/vhosts
worker_connections: This is the amount of client connections a single child process will handle by themselves at any one time. (default: 1024) Note: Multiply worker_processes times worker_connections for the total amount of connections Nginx will handle. Clients who connect after the max has been reached will be denied access.
keepalive_timeout 60 60; the first value is for keep-alive connections with the client. The second parameter assigns the value “Keep-Alive: timeout=time” in the header of answer. This header can convince some browsers to close the connection, so that the server does not have to.
Exclude File Type
and in the location line remove |html|htm and any file type which you want to serve via apache
Enable piped Apache logs via Main >> Service Configuration >> Apache Configuration >> Piped Log Configuration
Use Apache for one site
edit /etc/nginx/vhosts/domain.com and remove file extensions which you want to served by apache.