nginx基本

在ubuntu下

root@ubuntu:/etc/nginx/sites-enabled# whereis nginx
nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx /usr/share/man/man1/nginx.1.gz
root@ubuntu:/etc/nginx/sites-enabled# cd /etc/nginx/
root@ubuntu:/etc/nginx# ls
conf.d          koi-utf  mime.types  scgi_params      sites-enabled  win-utf
fastcgi_params  koi-win  nginx.conf  sites-available  uwsgi_params
root@ubuntu:/etc/nginx# tree
.
├── conf.d
├── fastcgi_params
├── koi-utf
├── koi-win
├── mime.types
├── nginx.conf
├── scgi_params
├── sites-available
│   └── default
├── sites-enabled
│   └── default -> /etc/nginx/sites-available/default
├── uwsgi_params
└── win-utf

3 directories, 10 files
root@ubuntu:/etc/nginx#

配置文件在/etc/nginx/sites-enabled/default

root路径:
server {
        #listen   80; ## listen for ipv4; this line is default and implied
        #listen   [::]:80 default ipv6only=on; ## listen for ipv6

        root /usr/share/nginx/www;
root@ubuntu:/etc/nginx/sites-enabled# cd /usr/share/nginx/www/
root@ubuntu:/usr/share/nginx/www# ls
50x.html  index.html
root@ubuntu:/usr/share/nginx/www#

编辑index.html

http://localhost体验nginx吧

靠,千万别没停nginx就删log啊

还有/tmp/目录下的东西,不懂别乱删好不?

log在/var/log/nginx下

--------------------------------

du-sh

du-sh*

du-ms`ls`

ps-ef|grepnginx

ls-l/proc/123123/fd

netstat-nltp|grepnginx

lsof-n|grepdelete

相关推荐