nginx install

Step 1:
Enable nginx repo + Install # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-4.noarch.rpm # yum -y install nginx * Accept the EPEL gpg-key when asked # /sbin/chkconfig nginx on Step 2: Fix log file formats for access_logs # cd /usr/src;wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz # tar -zxvf mod_rpaf-0.6.tar.gz; cd mod_rpaf-0.6 # /usr/local/apache/bin/apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c

Step 3: Load the Extension Go to the Web Host Manager (WHM) follow the tree here: Main >> Service Configuration >> Apache Configuration > Include Editor > Pre Main Include and Select the apache version that is running on the cPanel server.
add following code section there, and replace (place your ips here without the brackets) with the list of IP addresses on the cPanel server:
LoadModule rpaf_module modules/mod_rpaf-2.0.so RPAFenable On # Enable reverse proxy add forward RPAFproxy_ips 127.0.0.1 (place all your ips here without the brackets) RPAFsethostname On # let rpaf update vhost settings allowing to have # the same hostnames as in the actual configuration for the # forwarding apache installation RPAFheader X-Real-IP # Allows you to change which header we have mod_rpaf looking for # when trying to find the ip the that is forwarding our requests

Step 4: Change Apache's Port and install hooks. Go to your WHM >> tweak settings and change the apache port from 80 to 81 (find 0.0.0.0:80 and change it to 0.0.0.0.:81) # vi /etc/chkserv.d/httpd change 80 to 81, save # /scripts/restartsrv_tailwatchd # /usr/local/cpanel/whostmgr/bin/whostmgr2 updatetweaksettings # vi /usr/local/apache/conf/httpd.conf - Find any occurrences of port 80 and change to 81 then rebuild your apache configuration file by running # /scripts/rebuildhttpdconf # /etc/init.d/httpd restart # cd /root; wget http://vmrepo.websitehostserver.net/nginx.sh # chmod 755 /root/nginx.sh # cp /root/nginx.sh /scripts/postwwwacct # cp /root/nginx.sh /scripts/postwkillacct # mkdir -p /usr/share/nginx/logs/ # Run the script /root/nginx.sh # service httpd restart; service nginx restart

  • 57 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?