1
2
3
4
5
6
|
sudo
add-apt-repository ppa:nginx
/stable
sudo
apt-get update
sudo
apt-get
install
nginx
sudo
/etc/init
.d
/nginx
start
sudo
apt-get
install
php5-cli php5-cgi php5-fpm php5-mcrypt php5-mysql
sudo
vi
/etc/nginx/sites-available/default
|
1
2
3
4
5
6
7
8
|
index index.html index.htm index.php;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
|
1
2
3
4
5
6
7
8
9
10
|
root@ubuntu:
/home/hankcs
# netstat -ntpl
激活Internet连接 (仅服务器)
Proto Recv-Q Send-Q Local Address Foreign Address State PID
/Program
name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1060
/nginx
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1081
/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 834
/cupsd
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1442
/php-fpm
.conf)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 987
/mysqld
tcp6 0 0 :::80 :::* LISTEN 1060
/nginx
tcp6 0 0 ::1:631 :::* LISTEN 834
/cupsd
|