[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:hardware:arm:nginx [2020/03/05 08:31 (UTC)] – [Building the nginx package] correction exagahowtos:hardware:arm:nginx [2020/03/05 12:03 (UTC)] (current) – [Configuring nginx to run on Slackware ARM] added code 'default_server;' exaga
Line 213: Line 213:
  
     server {     server {
-        listen       80;+        listen       80 default_server;
         server_name  127.0.0.1 localhost;         server_name  127.0.0.1 localhost;
  
Line 273: Line 273:
 </code> </code>
  
-By default 'php-fpm' does not log anything other than startup and shutdown [see: '/var/log/php-fpm.log']. In order to log any relevant error messages we need to make one more change to the file. Find the 'catch_workers_output" section below and uncomment the setting, like this:+By default 'php-fpm' does not log anything other than startup and shutdown [see: '/var/log/php-fpm.log' after the daemon has been (re)started]. In order to log any relevant error messages we need to make one more change to the file. Find the 'catch_workers_output" section below and uncomment the setting, like this:
  
 <code> <code>
Line 430: Line 430:
 </code> </code>
  
-Bercause we want to use 'test.local' and 'extra.local' as domain [server_name] names we will add the following to our '/etc/hosts' file:+Because we want to use 'test.local' and 'extra.local' as domain name [server_name] aliases we will add the following to our '/etc/hosts' file:
  
 <code> <code>
Line 442: Line 442:
 </code> </code>
  
-The above settings will take effect as soon as the file is saved. However, there's nothing to "seeyet because we haven'cteated it! :-)+The above settings will take effect as soon as the file is saved. However, there's nothing there to see yet because we haven'created it! :-)
  
 So, then we create and edit the 'test.local.conf' file: So, then we create and edit the 'test.local.conf' file:
Line 450: Line 450:
 </code> </code>
  
-In this file we need to instruct 'nginx' which server requests it should listen for on a specific port. We also specify the path/to/the web directory files where this site will be located. So we'll enter the following text into this file:+In this file we need to instruct 'nginx' which server requests it should listen for on a specific port. We need to specify the path/to/the web directory files where this site will be located and we'll also configure the FastCGI server. So we'll enter the following text into this file:
  
 <code> <code>
Line 459: Line 459:
     # this root path is to the webdir     # this root path is to the webdir
     root /var/www/test.local;     root /var/www/test.local;
 +    
 +    # index pages to load in this order
 +    index index.php index.html index.htm;
  
     #This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf     #This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf
     access_log /var/log/nginx/access.log vcombined;     access_log /var/log/nginx/access.log vcombined;
 +
 +    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 +    #
 +    location ~ \.php$ {
 +       root           /var/www/test.local;
 +       fastcgi_pass   127.0.0.1:9000;
 +       fastcgi_index  index.php;
 +       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
 +       include        fastcgi_params;
 +    }
  
 } }
Line 477: Line 490:
     # this root path is to the webdir     # this root path is to the webdir
     root /var/www/extra.local;     root /var/www/extra.local;
 +
 +    # index pages to load in this order
 +    index index.php index.html index.htm;
  
     #This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf     #This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf
     access_log /var/log/nginx/access.log vcombined;     access_log /var/log/nginx/access.log vcombined;
 +
 +    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
 +    #
 +    location ~ \.php$ {
 +       root           /var/www/extra.local;
 +       fastcgi_pass   127.0.0.1:9000;
 +       fastcgi_index  index.php;
 +       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
 +       include        fastcgi_params;
 +    }
  
 } }
Line 503: Line 529:
 </code> </code>
  
-When all that's complete, the final task is to test the 'nginx' confiruation and restart the daemon.+When all that's complete, the final task is to test the 'nginx' configuration and restart the daemon.
  
 <code> <code>
 howtos:hardware:arm:nginx ()