1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

nginx automated installer

Discussion in 'Workarounds and Optimization' started by blargman, Feb 17, 2010.

Thread Status:
Not open for further replies.
  1. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Latest NginX Installer with whm Interface

    cP Nginx X - This is the latest modified version of this NginX installer based on the original developer 'blargman' and other contributers like 'icodex'

    Change Log:
    1- Whm interface ( Now you can restart, configure, etc within WHM without ssh)
    2- Temporary solution of whm service status issue.
    3- Resolved installer issue in cPanel 11.26

    You must need to uninstall old version before install via this version.

    Install instruction:
    cd /usr/local/src
    http://nginxcp.com/nginx1.10.tar
    tar xf nginx1.10.tar
    cd publicnginx
    ./nginxinstaller install

    If you don't want to uninstall old version and just want to install whm interface then run
    ./cpwhm-install
    Instead of ./nginxinstaller install

    This is open sourced version, All developers are welcomed to modify/upgrade the whm interface.

    Nginx Admin Blog
     
    #241 9xlinux, Sep 22, 2010
    Last edited: Sep 29, 2010
  2. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Is nginx installed ?

    Hi
    I did everything as per your instructions.

    i got the following messages
    ./nginxinstaller install
    /usr/local/src/publicnginx
    Welcome to the Nginx installer......Starting Install
    Generating vhosts...
    It looks like logins not working, check access key.
    Installing WHM interface...
    deploying booster rockets
    It looks like logins not working, check access key.

    Is the installation done ?

    How to know that nginx is installed and working fine.

    Thanks for the help
     
  3. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    In WHM
    Main >> cP Nginx X
    Nginx Service Status: Down

    Looks like its not working. Anyone has some clue how to make this working ?
     
  4. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    If showing 'Down' in service status Its means Nginx is not working.
    Fist uninstall script then go to
    Main >> Cluster/Remote Access >> Setup Remote Access Key
    Click Generate new key
    The reinstall again
    Note: You must be a root to install script.
     
  5. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    This works , but created many errors

    Hi 9xlinux,
    the way you suggested worked very well for me. But it produced few errors.

    i was getting the error
    nginx failed @ Thu Sep 23 12:24:16 2010. A restart was attempted automagically.

    i checked the Main >> Server Configuration >> Tweak Settings then system
    the apache was set to 0.0.0.0:8081

    Secondly
    i have lots of redirect rules in my .htaccess which were not working after this.

    Thirdly
    i use many jobs to run via cron job ( will they keep on working after nginx is functional )

    Fourth.
    i execute the php scripts inside the html page by doing these settings

    HTML:
    Please try to edit /usr/local/apache/conf/php.conf and add .html and. htm
    > to the x-httpd-php5 line then restart Apache and let me know if that works.
    Please update my knowledge on this

    Thanks
     
  6. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    For nginx failed Alert Its no issue, after install you may receive this alert one time.
    .htaccess should be work, there must be issue.
    The php script code inside html/htm will not work as html/htm will serve as static files.
     
  7. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    after the nginx is functional
    the files are served from the same location ?

    like /home/username/public_html ?
    or the path get change
    i am asking this as to know where to put the .htaccess so that the pages get redirect correctly.

    i can rename all .html as .php so that nginx don't serve them as static file.

    Rest all other functionality like Cron in cpanel will not be affected by nginx ?

    Thanks a million once again

    Pankaj Arya
     
  8. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    cP Nginx X

    You nothing need to change everything will be work as same as before.
    Only change html to php if you have php code in html.
     
  9. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    @9xlinux

    Is there a way to add additional nginx configuration files per vhost?
     
  10. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    The vhost configuration files are located at /etc/nginx/vhosts/
     
  11. furquan

    furquan Member

    Joined:
    Jul 27, 2002
    Messages:
    419
    Likes Received:
    0
    Trophy Points:
    16
    some gui snapshot ??

    Guys :

    I am also interested in deploying nginx on my servers, can some one post a GUI snapshot from their server as to show does it look like ? Or any working demo ?

    I hope i am not asking for too much :p
     
  12. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, I guess my question was too unspecific: What I mean is.. can I add custom configuration options which persist, even when your plugin regenerats the vhost files? Similar to the possibilities the Apache config distiller provides. "Dynamic inclusion of additional vhost configuration options" or so. :)

    Thanks!
     
  13. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    We will try in next vesrion if possible.
     
  14. nshahzad

    nshahzad New Member

    Joined:
    Mar 16, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    You can add in include in /scripts/createvhost.py and run that to have it include an 'addons' file
     
  15. nshahzad

    nshahzad New Member

    Joined:
    Mar 16, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Just upgraded from the original blargman version. Went smooth, so about to do my second server. Thanks for the awesome script.

    Just some recommendations for tweaks from my servers on the proxy settings, hopefully that helps some people out with random 504 errors. Sometimes Apache and some scripts send back larger-than-spec headers. That should fix those issues

    Code:
    client_max_body_size    10m;
    client_body_buffer_size 128k;
    proxy_send_timeout   90;
    proxy_read_timeout   90;
    proxy_buffer_size    128k;
    proxy_buffers     4 256k; #16 32k;
    proxy_busy_buffers_size 256k;
    proxy_temp_file_write_size 256k;
    
    Particularly the buffers sizes.
     
    #255 nshahzad, Sep 23, 2010
    Last edited: Sep 23, 2010
  16. gigawiz

    gigawiz New Member

    Joined:
    May 8, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    thanks for the v1.10 installer... makes life easy :D
     
    #256 gigawiz, Sep 23, 2010
    Last edited: Sep 23, 2010
  17. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Error Log in Nginx

    I just saw some of the log on my site.

    Here are they

    HTML:
    2010/09/24 11:19:59 [info] 23847#0: *197646 client timed out (110: Connection timed out) while reading client request line, client: 14.194.89.82, server: 0.0.0.0:80
    2010/09/24 11:20:01 [info] 23847#0: *201097 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: 127.0.0.1, server: _, request: "GET /whm-server-status HTTP/1.0", upstream: "http://127.0.0.1:8081/whm-server-status"
    2010/09/24 11:21:26 [info] 23847#0: *198525 client timed out (110: Connection timed out) while reading client request line, client: 115.117.182.10, server: 0.0.0.0:80
    2010/09/24 11:24:12 [info] 23847#0: *200553 client timed out (110: Connection timed out) while reading client request line, client: 14.194.89.82, server: 0.0.0.0:80
    2010/09/24 11:24:12 [info] 23847#0: *200555 client timed out (110: Connection timed out) while reading client request line, client: 14.194.89.82, server: 0.0.0.0:80
    2010/09/24 11:24:12 [info] 23847#0: *200556 client timed out (110: Connection timed out) while reading client request line, client: 14.194.89.82, server: 0.0.0.0:80
    2010/09/24 11:24:44 [info] 23847#0: *200931 client timed out (110: Connection timed out) while reading client request line, client: 115.117.182.10, server: 0.0.0.0:80
    2010/09/24 11:25:01 [info] 23847#0: *204344 client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: 127.0.0.1, server: _, request: "GET /whm-server-status HTTP/1.0", upstream: "http://127.0.0.1:8081/whm-server-status"
    2010/09/24 11:27:04 [info] 23847#0: *202463 client timed out (110: Connection timed out) while reading client request line, client: 115.117.182.10, server: 0.0.0.0:80
    Can they be ignored ?
     
  18. 9xlinux

    9xlinux Member

    Joined:
    Dec 20, 2009
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Nginx Admin v1.11 Release.

    New version v1.11 release.

    Update Instruction:
    Code:
    cd /usr/local/src/publicnginx; rm -f cpwhm-install; wget nginxcp.com/cpwhm-install; chmod +x cpwhm-install; ./cpwhm-install
    Change Log:
    Changed Plug-in Name to Nginx Admin
    Icon updated
    httpd detailed status added (incase of cPanel httpd status not work you can use here)

    The developer version will be release soon with nginx-0.8.xx
     
  19. pankajarya

    pankajarya New Member

    Joined:
    Jan 19, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Updated to the changed version

    I have updated my nginx as per you suggestion. And need not to mention every thing is working great.
    Great work dude. It has saved many hour of ours.

    Thanks a million once again
     
  20. bhanuprasad1981

    Joined:
    Aug 5, 2008
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    i get this error while i try to restart nginx or apache :-

    Code:
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [warn] 22697#0: conflicting server name "xx.xxx.xx.xxx" on xx.xxx.xx.xxx:80, ignored
    2010/09/24 14:21:34 [notice] 22697#0: using the "epoll" event method
    2010/09/24 14:21:34 [notice] 22697#0: nginx/0.7.67
    2010/09/24 14:21:34 [notice] 22697#0: built by gcc 4.1.2 20080704 (CloudLinux 4.1.2-48)
    2010/09/24 14:21:34 [notice] 22697#0: OS: Linux 2.6.18-294.8.1.el5.lve0.7.33
    2010/09/24 14:21:34 [notice] 22697#0: getrlimit(RLIMIT_NOFILE): 65535:65535
    2010/09/24 14:21:34 [notice] 22698#0: start worker processes
    2010/09/24 14:21:34 [notice] 22698#0: start worker process 22699
    
    
     
Thread Status:
Not open for further replies.

Share This Page