Results 1 to 6 of 6

Thread: Nginx automated installer

  1. #1
    Join Date
    Apr 2010
    Posts
    71

    Nginx automated installer

    I attempts to use Apache / MySQL / PHP on MacOS X with either versions Out-of-the-box Apple or specific packages that do not work well / at all as ca, The reason has let me to compile / install a more complete Web: Apache, but more of Nginx (and here I stand), a PHP 5 with standard extensions and CGI execution, and finally a MySQL 5. So what solution can help. Please help. Thanks.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Nginx automated installer

    You need to make, install and especially the wiki provides a than detailed. Note that there is also a debian package, but its creator has decided to quit for the same reasons may. The default configuration of domains / virtual host is in one single file: conf / nginx.conf. Having said this can quickly become rough in the case of a configuration with multiple domains. We will separate files by domain. Go to the configuration directory:
    Cd / usr / local / nginx / conf.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Nginx automated installer

    You need to delete the file nginx.conf this passage:

    Code:
    server (
    listen 80;
    server_name localhost;
    # Charset koi8-r;
    # Access_log logs / host.access.log hand;
    Rental / (
         root html;
            index index.html index.htm;
        )
    Error_page # 404 / 404.html;
    # Redirect server error pages to the static page / 50x.html
    # error_page 500 502 503 504 / 50x.html;
        location = / (50x.html
            root html;
    )
    
    # Proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
        Rental # ~ \. Php $ (
    # Proxy_pass http://127.0.0.1;
    #)
    # Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    # Rental # ~ \. Php $ (
    # Root html;
    # Fastcgi_pass 127.0.0.1:9000;
    # Fastcgi_index index.php;
    # Fastcgi_param SCRIPT_FILENAME / scripts $ fastcgi_script_name;
    # Include fastcgi_params;
    #)
    
        # Deny access to. Htaccess files, if Apache's document root
        # Concurs with nginx's one
        #
        Rental # ~ / \. Ht (
        # Deny all;
        #)
    )

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Nginx automated installer

    Nginx can be configured for a multi-processor machine or a processor Multi-core. Basically it is sufficient to state in the global configuration file (Conf / nginc.conf) the number of processes that will launch and what Nginx allocate processors. Example of a machine has 4 processors:
    worker_processes 4;
    worker_cpu_affinity 0001 0010 0100 1000;
    We will launch four process and each will be assigned to a processor.
    Another example:
    worker_processes 2;
    worker_cpu_affinity 0101 1010;
    We will create this time two processes, the first will be assigned to CPU0/CPU2 processors and the second CPU1/CPU3.

  5. #5
    Join Date
    Feb 2010
    Posts
    678

    Re: Nginx automated installer

    The web server nginx can handle virtual hosts, that is to say that we can host multiple domains different on the same IP. The choice is made based on the content of the HTTP request. The Host field determines virtual host should handle the query. This is very easy, unless you wish to work with SSL. Indeed, in the case of SSL, the negotiation of the key encryption intervenes before while sending HTTP request.

  6. #6
    Join Date
    Feb 2010
    Posts
    701

    Re: Nginx automated installer

    The nginx configuration below is a configuration test. She certainly will not load and does not likely correspond to your needs. But its simplicity allows a better understanding of what is happening.
    PHP Code:
    Configuring Nginx
    www
    -data user;
    worker_processes 1;
    error_log / var / log nginx error.log;
    pid / var / run nginx.pid;
    events (
        
    worker_connections 1024;
    )
    http (
        include / 
    etc nginx mime.types;
        
    default_type application octet-stream;
        
    log_format vhost '$ host $ REMOTE_ADDR - $ REMOTE_USER [$ time_local] "$ request" $ status $ body_bytes_sent "$ HTTP_REFERER" "$ HTTP_USER_AGENT"';
        
    access_log / var / log nginx access.log;
        
    sendfile on;
        
    # Tcp_nopush it;
        
    Keepalive_timeout # 0;
        
    keepalive_timeout 65;
        
    TCP_NODELAY is;
        
    gzip on;
        include / 
    etc nginx conf./ *. conf;
        include / 
    etc nginx sites-enabled / *;

    You will notice the appearance of the Directive log_format: I started with the combined reference and have it added $ Host to have the HTTP Host field in the log file. This is important because each area (and all associated subdomains) have only one log file.

Similar Threads

  1. OpenSolaris 2009.06 Automated Installer
    By SoftWore in forum Technology & Internet
    Replies: 1
    Last Post: 16-07-2010, 01:01 PM
  2. How to use nginx for accelerating Apache
    By Alibamu in forum Networking & Security
    Replies: 6
    Last Post: 18-06-2010, 12:38 AM
  3. How to Install Nginx with PHP5 on Fedora 12
    By OSzilla in forum Operating Systems
    Replies: 5
    Last Post: 09-02-2010, 03:36 AM
  4. Which is better Nginx or Lighttpd
    By Cabexas in forum Networking & Security
    Replies: 3
    Last Post: 29-09-2009, 11:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,664,670.80012 seconds with 17 queries