Install/Nginx: Difference between revisions

From Playful Exploration
Jump to navigation Jump to search
m (Peter moved page Template:Install Nginx to Install Nginx without leaving a redirect)
No edit summary
Line 1: Line 1:
...
Using ssh:
 
    apt-get install nginx-full
    service nginx start
    nano /etc/nginx/sites-available/default
 
look for:
 
    [...]
    server {
        listen  80;
 
add index.php to index
 
    index index.php index.html index.htm;
 
change the server name to server name or ip
 
    server_name m.chaospage.com;
 
Change the "location ~ \.php$ {" section, uncomment include snippets/fastcgi-php.conf
 
    location ~ \.php$ {
      try_files $uri =404;
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include fastcgi_params;

Revision as of 06:09, 29 December 2015

Using ssh:

   apt-get install nginx-full
   service nginx start
   nano /etc/nginx/sites-available/default

look for:

   [...]
   server {
       listen   80;

add index.php to index

   index index.php index.html index.htm;

change the server name to server name or ip

   server_name m.chaospage.com;

Change the "location ~ \.php$ {" section, uncomment include snippets/fastcgi-php.conf

   location ~ \.php$ {
     try_files $uri =404;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;