- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install nginx php5-cli php5-cgi php5-fpm
可修改 /etc/nginx/sites-available/default ,將 default listen port 80 改為 8088 。或者將預設的網頁根目錄 root /usr/share/nginx/www; 改為 /home/myroot; 。
listen 8088
root /home/myroot;
設定 .php
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
存檔後。啟動執行/停止 ngnix :
/etc/init.d/ngnix start
/etc/init.d/ngnix stop
#