DirectAdmin install Nginx,Nginx on DirectAdmin.
I note http://danginx.com/ but pricing Is the devil!!!!
Below for manual installation:
CentOS5:
wget http://download.efsync.org/Nginx/nginx-release-rhel-5-0.el5.ngx.noarch.rpm
CentOS6:
wget http://download.efsync.org/Nginx/nginx-release-rhel-6-0.el6.ngx.noarch.rpm
installation.
CentOS5:
rpm -ivh nginx-release-rhel-5-0.el5.ngx.noarch.rpm
CentOS6:
rpm -ivh nginx-release-rhel-6-0.el6.ngx.noarch.rpm
After installation is complete, the upgrade to the latest version 1.4 nginx.
yum install -y nginx
Add a user and group to run nginx.
groupadd www
useradd -s /sbin/nologin -g www www
Change nginx configuration file.
First delete the original profile.
rm -rf /etc/nginx/nginx.conf
Create a profile
vi /etc/nginx/nginx.conf
Edit:
download nginx.conf config file http://en.holin.net/wp-content/uploads/2013/08/DirectAdmin-_Nginx.txt
save and exit
Change Apache port to 800:
sed -i “s#ips.conf#ips_hack.conf#g” /etc/httpd/conf/extra/httpd-vhosts.conf
cp /etc/httpd/conf/ips.conf /etc/httpd/conf/ips_hack.conf
sed -i “s#:80#:800#g” /etc/httpd/conf/ips_hack.conf
sed -i “s#:80#:800#g” /etc/httpd/conf/extra/httpd-vhosts.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/ips_virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s#Port 80#Port 800#g” /usr/local/directadmin/data/templates/httpd.conf
sed -i “s#Listen 80#Listen 800#g” /usr/local/directadmin/data/templates/httpd.conf
sed -i “s#Listen 80#Listen 800#g” /etc/httpd/conf/httpd.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/users/*/httpd.conf
Restart apache and nginx:
service httpd restart
start nginx:
service nginx start
service nginx restart
all ok now
Other:
the uploaded file exceeds MAX_FILE_SIZE directive that was specified in
Change upload file max:
change nginx.conf POST max:
http {
………..
types_hash_max_size 2048;
client_max_body_size 2048M; #New Edit the max > your “php.ini” “post_max_size = 200m”
……………
}
I note http://danginx.com/ but pricing Is the devil!!!!
Below for manual installation:
CentOS5:
wget http://download.efsync.org/Nginx/nginx-release-rhel-5-0.el5.ngx.noarch.rpm
CentOS6:
wget http://download.efsync.org/Nginx/nginx-release-rhel-6-0.el6.ngx.noarch.rpm
installation.
CentOS5:
rpm -ivh nginx-release-rhel-5-0.el5.ngx.noarch.rpm
CentOS6:
rpm -ivh nginx-release-rhel-6-0.el6.ngx.noarch.rpm
After installation is complete, the upgrade to the latest version 1.4 nginx.
yum install -y nginx
Add a user and group to run nginx.
groupadd www
useradd -s /sbin/nologin -g www www
Change nginx configuration file.
First delete the original profile.
rm -rf /etc/nginx/nginx.conf
Create a profile
vi /etc/nginx/nginx.conf
Edit:
download nginx.conf config file http://en.holin.net/wp-content/uploads/2013/08/DirectAdmin-_Nginx.txt
save and exit
Change Apache port to 800:
sed -i “s#ips.conf#ips_hack.conf#g” /etc/httpd/conf/extra/httpd-vhosts.conf
cp /etc/httpd/conf/ips.conf /etc/httpd/conf/ips_hack.conf
sed -i “s#:80#:800#g” /etc/httpd/conf/ips_hack.conf
sed -i “s#:80#:800#g” /etc/httpd/conf/extra/httpd-vhosts.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/ips_virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host2_sub.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host_sub.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/redirect_virtual_host.conf
sed -i “s#:|PORT_80|#:800#g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s# |MULTI_IP|##g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s/CustomLog/#CustomLog/g” /usr/local/directadmin/data/templates/virtual_host2.conf
sed -i “s#Port 80#Port 800#g” /usr/local/directadmin/data/templates/httpd.conf
sed -i “s#Listen 80#Listen 800#g” /usr/local/directadmin/data/templates/httpd.conf
sed -i “s#Listen 80#Listen 800#g” /etc/httpd/conf/httpd.conf
sed -i “s#:80#:800#g” /usr/local/directadmin/data/users/*/httpd.conf
Restart apache and nginx:
service httpd restart
start nginx:
service nginx start
service nginx restart
all ok now
Other:
the uploaded file exceeds MAX_FILE_SIZE directive that was specified in
Change upload file max:
change nginx.conf POST max:
http {
………..
types_hash_max_size 2048;
client_max_body_size 2048M; #New Edit the max > your “php.ini” “post_max_size = 200m”
……………
}