havietduc91 / experience

0 stars 0 forks source link

Nginx #36

Open havietduc91 opened 7 years ago

havietduc91 commented 7 years ago

Cách xem lỗi trong Nginx

/var/log/nginx/error.log

havietduc91 commented 7 years ago

Config short_open_tag không nhận

https://nabtron.com/enable-php-short-tags-on-nginx-and-apache/ sudo service php7.0-fpm restart sudo service nginx restart

havietduc91 commented 6 years ago

How do I find and kill a php loop (process)?

https://superuser.com/questions/800207/how-do-i-find-and-kill-a-php-loop-process Run

ps -efw | grep php | grep -v grep | awk '{print $2}' | xargs kill
havietduc91 commented 6 years ago

Address already in use)

If you get following error, when you try to start nginx…

[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Then it means nginx or some other process is already using port 80.

You can kill it using:

sudo fuser -k 80/tcp

And then try restarting nginx again:

service nginx start