Skip to main content

Posts

Showing posts with the label nginx

Note some Laravel, NGINX, NodeJS deploy

Avoid/reduce log output on Laravel Console https://stackoverflow.com/questions/49346700/laravel-disable-artisan-console-output-when-running-tests Gcloud SSH issue Jun 20 06:37:18 instance-3 sshd[12753]: Connection closed by 113.190.235.xxx port 7600 [preauth] Jun 20 06:37:19 instance-3 sshguard[1393]: Blocking 113.190.235.188:4 for >630secs: 40 danger in 4 attacks over 184 seconds (all: 40d in 1 abuses over 184s). sudo service sshguard restart USER=root ; COMMAND=/usr/sbin/service sshguard restart Jun 20 06:45:11 instance-3 sudo: pam_unix(sudo:session): session opened for user root by vandung53cc(uid=0) Jun 20 06:45:11 instance-3 sshguard[1393]: Got exit signal, flushing blocked addresses and exiting... Jun 20 06:45:11 instance-3 sudo: pam_unix(sudo:session): session closed for user root Jun 20 06:45:11 instance-3 sshguard[12902]: Started with danger threshold=40 ; minimum block=420 seconds Jun 20 06:45:15 instance-3 sshd[12909]: Connection closed by 113.190.235.188 por...

Nginx 3

Vhost config ERR_ICANN_NAME_COLLISION when trying to use localhost .dev in Chrome Lỗi liên quan đến tên vhost: 1. /etc/hosts kiểm tra 2. /etc/nginx/sites-available  và /etc/nginx/sites-enabled xem tương ứng và chuẩn chưa. Ko thì unlink rồi tạo lại. Lưu ý khi tạo soft link cần chỉ định absolute path (y thì chưa rõ). sudo ln -s /etc/nginx/....          /etc/nginx/...... Lỗi config server (vhost) hay server block. block chắc đúng cho config / 1 file như CentOS còn Ub (debian) thì tách ra file khác nhau roài. Để ý: servername cần thêm cả www. ở đầu ko thì hay gặp lỗi nhiểu vhost loạn dẫn đến redirect về default vhost. Nó cứ bay về trang đầu tiên cài vhost. Lỗi này thì Apache cũng vậy vì cơ chế set vhost là same. ví dụ cho phpMyAdmin: https://www.digitalocean.com/community/questions/a-working-phpmyadmin-nginx-conf nickfarrow:playbuzz$ cat /etc/nginx/sites-available/padm.local.dev  server {         liste...