ubuntu 14.04 64bit
sudo apt-get install nginx
sudo vim /etc/nginx/sites-available/default
curl localhost:80
sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo nginx -t (查看错误信息)
sudo service supervisor restart
ubuntu@VM-55-81-ubuntu:~$ sudo netstat -lpn
Active Internet connections (only servers)
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 801/nginx
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 762/sshd
tcp6 0 0 :::80 :::* LISTEN 801/nginx
tcp6 0 0 :::22 :::* LISTEN 762/sshd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 7461 339/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 10235 1353/secu-tcs-agent /usr/local/sa/agent/secubase/secu-tcs-agent.unix
unix 2 [ ACC ] STREAM LISTENING 10236 1353/secu-tcs-agent /usr/local/sa/agent/secubase/secu-tcs-agent-v5.unix
unix 2 [ ACC ] STREAM LISTENING 10237 1353/secu-tcs-agent /usr/local/sa/agent/secubase/secu-tcs-agent-v5-notpl.unix
unix 2 [ ACC ] STREAM LISTENING 8794 766/acpid /var/run/acpid.socket
unix 2 [ ACC ] SEQPACKET LISTENING 7259 263/systemd-udevd /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 6950 1/init @/com/ubuntu/upstart