sudo vim /etc/logrotate.d/nginx
에서 nginx log를 logroate로 관리logrotate -d -f /etc/logrotate.d/nginx
로 테스트 가능 (-d
는 dryrun,-f
는 size나 daily 같은 조건 관계 없이 force logrotate)
grep CRON /var/log/syslog
로 cronjob log 확인crontab -e
기본 에디터를 vim으로 바꾸고 싶다면export EDITOR=/usr/bin/vim
uname -a
: 리눅스 버전 확인find . -name "*.pdf" -delete
:rm -rf abr*
했는데 'Argument list too long' 에러날 때
- The
sites-available
folder is for storing all of your vhost configurations, whether or not they're currently enabled. - The
sites-enabled
folder contains symlinks to files in the sites-available folder. This allows you to selectively disable vhosts by removing the symlink. /etc/nginx/nginx.conf
sudo ln -s /etc/nginx/sites-available/test.conf /etc/nginx/sites-enabled/
to create symlinknginx -t
to check configuration file syntax is oknginx -s [stop | quit | reload | reopen]
- stop — fast shutdown
- quit — graceful shutdown
- reload — reloading the configuration file
- reopen — reopening the log files
curl -I superset.cc
to check header
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sun, 04 Nov 2018 13:35:17 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 16395
Connection: keep-alive
X-Powered-By: Express
Cache-Control: public, max-age=0
ETag: W/"400b-Y+vdSsJ5yEFmmQK+vjBSA6htAxA"
Vary: Accept-Encoding