Page 6 of 52 FirstFirst ... 4567816 ... LastLast
Results 76 to 90 of 780

Thread: nginx automated installer

  1. #76
    Member
    Join Date
    Jun 2006
    Posts
    79

    Default

    Quote Originally Posted by bmbraga View Post
    I have a problem, the system is ignoring it. Htaccess.
    I have a configuration that generates the file with php. Js when it does not exist, however the. Htaccess is being ignored and the file is not generated.
    How do I get the nginx read the error before the 404. Htaccess. ?
    Like i said on your PM, if you let nignx proxy the request, apache will get that and read whatever you have (htaccess, etc.).

  2. #77
    Member
    Join Date
    Mar 2007
    Posts
    29

    Default Comparsion

    How does Nginx compare to Apache? How would I benefit of using Nginx instead of Apache?

  3. #78
    Member
    Join Date
    Feb 2009
    Posts
    33

    Default

    It is working on my personal server where I host less than 10 domains. But not on a production server.

  4. #79
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    789

    Default

    Most sites we see that require a dedicated environment where we could stick nginx in are heavy PHP websites. Any idead on when you will have nginx using spawn-fcgi from the LightTPD project to get it serving up PHP? That is what I am interested in.

    *Or even PHP-FPM?
    .

  5. #80
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    789

    Default

    So I figured I would test this little installer out.

    The below thread looked interesting and I was hoping it was integrated but immediately viewing Apache status results in

    "Failed to receive status information from Apache.
    Unable to connect to local httpd server."


    Quote Originally Posted by xanubi View Post
    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.
    .

  6. #81
    Member
    Join Date
    Mar 2004
    Posts
    27

    Default

    I'm having another problem, did the installation on 2 servers, one works perfectly fine. In the second I did, the settings are 100% equal, but the "apache status of failed.
    What should I look?

  7. #82
    Member
    Join Date
    Jul 2006
    Posts
    292

    Default

    I had an issue with the Apache status as well, on a fresh server. Once I created an account though, it worked as it should.

  8. #83
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    789

    Default

    I was hoping that would be the case as well but still no go. Time for me to hit the error logs.

    I have it corrected and seems to be working great. I noticed the following files are included:

    /etc/nginx/fastcgi.conf
    /etc/nginx/fastcgi.conf.default
    /etc/nginx/fastcgi_params
    /etc/nginx/fastcgi_params.default

    have you made any progress with fastcgi. I could integrate it manually but my concern is cPanel integration.

    *Also, do you have SMP enabled in this compile?

    Quote Originally Posted by ChrisRHS View Post
    I had an issue with the Apache status as well, on a fresh server. Once I created an account though, it worked as it should.
    Last edited by Solokron; 04-11-2010 at 01:14 AM.
    .

  9. #84
    Member
    Join Date
    Mar 2007
    Posts
    29

    Default

    Quote Originally Posted by n00bie View Post
    how does nginx compare to apache? How would i benefit of using nginx instead of apache?
    bump bump!

  10. #85
    Member
    Join Date
    Jul 2004
    Posts
    536

    Default

    This worked great on a redhat server ( thanks ) but failed on a centos 64 bit:
    Code:
    Installation Complete -- run /etc/init.d/nginx restart to start nginx      
    [root@host] publicnginx >> /etc/init.d/nginx restart   
    Restarting nginx daemon: nginxcat: /var/run/nginx.pid: No such file or directory
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
     not running[warn]: conflicting server name "xx.xx.xx.x" on 0.0.0.0:80, ignored                        
    [emerg]: could not build the server_names_hash, you should increase either server_names_hash_max_size: 2048 or server_names_hash_bucket_size: 128                                                                                 
     already running.
    Any ideas?

  11. #86
    Member
    Join Date
    Mar 2007
    Posts
    36

    Default

    Quote Originally Posted by nshahzad View Post
    What I did was add a /etc/nginx/proxy.conf file with:

    Code:
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_redirect http://206.214.223.169:8081 http://206.214.223.169;
    proxy_pass http://206.214.223.169:8081/;
    And replace the above in /scripts/createvhosts.py with:

    Code:
    include /etc/nginx/proxy.conf
    Then just run /scripts/createvhosts.py to regenerate. Seems to be working so far.
    this one can be used if you only have 1 ip address but if more then 1 i think it's will not worked or i'm wrong ?

  12. #87
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    789

    Default

    I am running it on a CentOS 64-bit server with no errors. Your error looks to be a config issue, not a binary issue.

    Quote Originally Posted by kernow View Post
    This worked great on a redhat server ( thanks ) but failed on a centos 64 bit:
    Code:
    Installation Complete -- run /etc/init.d/nginx restart to start nginx      
    [root@host] publicnginx >> /etc/init.d/nginx restart   
    Restarting nginx daemon: nginxcat: /var/run/nginx.pid: No such file or directory
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
     not running[warn]: conflicting server name "xx.xx.xx.x" on 0.0.0.0:80, ignored                        
    [emerg]: could not build the server_names_hash, you should increase either server_names_hash_max_size: 2048 or server_names_hash_bucket_size: 128                                                                                 
     already running.
    Any ideas?
    .

  13. #88
    Member
    Join Date
    Jul 2004
    Posts
    536

    Default

    Its the same script that worked OK on our redhat server, so it should work on the centos. No changes have been made to the script.

  14. #89
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    789

    Default

    ok, I am going to save some of you a lot of headaches when it comes to rewrites with nginx. I spent all day trying out rewrites and trying to figure out why they were not working. Even checked with a heavy nginx user and it seemed to threw him off as well for a bit. So here you go, if you plan on doing any .htm or .html rewrites, remove the damn file types in the location ~* \. area as nginx will completely ignore any rewrite rules if they are immediately proxied in that area.
    Last edited by Solokron; 04-13-2010 at 06:53 PM.
    .

  15. #90
    Member
    Join Date
    Jul 2004
    Posts
    536

    Default

    Just to clarify
    ...remove the damn file types in the location ~* \.
    Are you saying to remove files types from every clients root directory if their using rewrite rules ?
    Last edited by kernow; 04-14-2010 at 05:32 AM.

Page 6 of 52 FirstFirst ... 4567816 ... LastLast

Similar Threads

  1. Replies: 6
    Last Post: 08-19-2011, 03:38 AM
  2. Replies: 2
    Last Post: 01-11-2011, 09:51 AM
  3. nginx automated installer
    By blargman in forum cPanel & WHM Discussions
    Replies: 222
    Last Post: 08-24-2010, 06:22 PM

Tags for this Thread