Status
Not open for further replies.

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
Evidently I don't know hot to post in the right forum.

This is an automated nginx installer for cpanel. Integrates so that domain adding/removal is all done automatically.
Some people had asked for cpanel support. In lieu of that, this does pretty much everything I can think of that they would do. It creates a vhost for each domain/addon/subdomain and serves up static content.

Let me know if you have any thoughts/questions or better yet suggestions.

Updated
http://blargman.com/public.tar (nginx-0.7.67)
http://blargman.com/publicnginxv8.tar (nginx-0.8.41)
 
Last edited:

erikg

Registered
Jul 14, 2008
1
0
51
This script works wonderfully even for people who don't know how to properly use NGINX. Thanks Blargman you saved my day! :D
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
hah, full disclosure, I should say I work with Erikg :P , but thanks Erik.
 

xanubi

Well-Known Member
Jun 28, 2006
86
2
158
I would like to know if i install this on a production server that have 20 configured domains, each one with subdomains and domain addons, will the install create the correct configuration for that existing vhosts?
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
That is correct xanubi. It pulls all of the domains/subdomains from the machine via the cpanel userdata files as well as the Cpanel XML API.
 

bhanuprasad1981

Well-Known Member
Aug 5, 2008
222
0
66
India
i have got nginx installed by some other guys before , if i use this will it update old ? what version of nginx this installs stable or developer ?
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
It currently installs the latest stable 0.7.65. If you install it, it would overwrite your nginx.conf with it's own so it would upgrade it in a sense. Though I would suggest making a backup of your config. Running ./nginxinstaller uninstall and then running ./nginxinstaller install. Just to be sure any of your old config was not still lingering.

Do you have old configuration data that you wish to keep?
 

texo

Well-Known Member
Mar 28, 2007
144
2
168
blargman, thank you very much for this. I've gone through your readme, but could you --please -- post a step-by-step for those of us who don't quite know where to start with the files we've downloaded from you?
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
Hey Texo, usage is just install and uninstall as far as the nginxinstaller script goes.

cd /usr/local/src
wget blargman.com/public.tar
tar xf public.tar
cd publicnginx
./nginxinstaller install


Let me know if there is something else or if you have any questions
 

texo

Well-Known Member
Mar 28, 2007
144
2
168
Awesome, thank you. Two more questions, please:

does this replace apache or work in tandem, serving static files and passing everything else on to apache

would you be offering support for $$$/hour? :)
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
I plan on shortly adding fcgi support to complete replace apache. Currently it serves up static content and passes php to Apache.

I'm willing to help you with whatever you may need with it.
 

xanubi

Well-Known Member
Jun 28, 2006
86
2
158
I would like to give some sugestions, based on what i see after install and production.

======================
1) createvhosts.py
======================
Add more file types, like this:
location ~* \.(gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|htm|html|txt|js|css|exe|zip|rar|gz|tgz|uha|7z|doc|docx|xls|xlsx|pdf)$ {

======================
2) STATUSURL="http://localhost/whm-server-status"
======================
On files:
/usr/local/apache/bin/apachectl
/etc/rc.d/init.d/httpd

Change the line:
STATUSURL="http://localhost/whm-server-status"
To:
STATUSURL="http://localhost:8081/whm-server-status"

======================
3) Service and Chkcfg
======================
Edit file /etc/chkserv.d/chkservd.conf and add nginx:1

Add a file named nginx to /etc/chkserv.d/ and inside put this:
service[nginx]=x,x,x,service nginx restart,nginx,root


:::::::::::::::::::::::::::::::::::::::::::::::::::::

That's it. With this settings, the "apache status" option of cpanel will work again, and the nginx service will be monitored and you can choose it from cpanel option "service manager". I hope this helps.
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
./nginxinstaller uninstall

This will remove it completely and set you back to Apache only.
 

9xlinux

Well-Known Member
Verifed Vendor
Dec 20, 2009
185
0
66
cPanel Access Level
Root Administrator
Hey Texo, usage is just install and uninstall as far as the nginxinstaller script goes.

cd /usr/local/src
wget blargman.com/public.tar
tar xf public.tar
cd publicnginx
./nginxinstaller install


Let me know if there is something else or if you have any questions
/etc/init.d/nginx restart
Restarting nginx daemon: nginx[warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:22
What I need to do?
 
Last edited:

xanubi

Well-Known Member
Jun 28, 2006
86
2
158
/etc/init.d/nginx restart
Restarting nginx daemon: nginx[warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:22
What I need to do?
I had that problem. Edit the /etc/nginx/nginx.conf and remove the word text/html. Don't worry, nginx will serve html files the same way.
 
Status
Not open for further replies.