User Tools

Site Tools


linux:stuff

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:stuff [2015/09/21 21:10]
redox [Show the whole HID descriptors on GNU/Linux]
linux:stuff [2019/12/25 15:40] (current)
Line 37: Line 37:
     echo -n interface-filename >​bind ​     echo -n interface-filename >​bind ​
  
 +## Install NGinx + PHP + FuelPHP
 +<​code>​
 +sudo aptitude update
 +sudo aptitude install nginx php5-fpm php5-cli
 +
 +Edit /​etc/​nginx/​php-handler
 +
 +  location ~* ^/​.*\.php.*$ {
 +          fastcgi_split_path_info ^(.+\.php)(/​.+)$;​
 +          fastcgi_index index.php;
 +          fastcgi_pass unix:/​var/​run/​php5-fpm.sock;​
 +          include fastcgi_params;​
 +          fastcgi_param ​  ​PATH_INFO ​        ​$fastcgi_path_info;​
 +          fastcgi_param ​  ​SCRIPT_FILENAME ​  ​$document_root$fastcgi_script_name;​
 +  }
 +
 +  # Security stuff
 +  location ~ /\.ht {
 +          deny  all;
 +  }
 +
 +Edit /​etc/​nginx/​sites-available/​01-YOUR_HOST
 +
 +  # wildcard subdomains
 +  server {
 +          listen 80;
 +
 +          server_name ​ ~^(?<​dom>​[^\.]+)+\.YOUR_HOST$;​
 +          if (!-d /​srv/​www/​YOUR_HOST/​$dom) {
 +                  rewrite . http://​www.YOUR_HOST/​ redirect;
 +          }
 +          root /​srv/​www/​YOUR_HOST/​$dom;​
 +
 +          index index.php index.html index.htm;
 +          include php-handler;​
 +  }
 +
 +Link it as enabled
 +
 +  sudo ln -s /​etc/​nginx/​sites-available/​01-YOUR_HOST /​etc/​nginx/​sites-enabled/​01-YOUR_HOST
 +
 +Restart the services
 +
 +  sudo service php5-fpm restart
 +  sudo service nginx restart
 +
 +wget -O fuelphp-1.7.2.zip http://​fuelphp.com/​files/​download/​28
 +unzip fuelphp-1.7.2.zip
 +mv fuelphp-1.7.2 /​srv/​www/​YOUR_HOST/​_YOUR_SITE_
 +
 +Edit /​srv/​www/​YOUR_HOST/​_YOUR_SITE_/​index.php
 +
 +  <?php
 +  header('​Location:​ public/'​);​
 +  ?>
 +
 +Chmod it correctly:
 +
 +  sudo chown www-data:​www-data /​srv/​www/​YOUR_HOST/​_YOUR_SITE_
 +</​code>​
/home/share/www/redox.ws/wiki/data/attic/linux/stuff.1442862648.txt.gz · Last modified: 2019/12/25 15:40 (external edit)