Nignx 模組 - upstream
Nignx 模組 - upstream
Nginx 模組可分成三類: handler, filter 以及 upstream
handler 以及 filter 主要用於單機,可以讓 Nginx 方便的管理單機運作。
upstream 則是主要用於分布式的處理,負責處理連線請求及代理。
從根本來說,upstream 其實是屬於 handler 的一部份,
他主要的工作是負責將請求轉發到 nginx 內部
Continue ReadingMarketing, SEO, Web trends, Programming tutorial, Web design, and Life event...
Nginx 模組可分成三類: handler, filter 以及 upstream
handler 以及 filter 主要用於單機,可以讓 Nginx 方便的管理單機運作。
upstream 則是主要用於分布式的處理,負責處理連線請求及代理。
從根本來說,upstream 其實是屬於 handler 的一部份,
他主要的工作是負責將請求轉發到 nginx 內部
Continue ReadingPWA (Progressive Web Apps) 可以讓網頁以 Web App 的形式運用在移動裝置及桌機
以仿原生APP的用戶體驗,可以支援離線操作,推播等APP功能,
以及仍保持 Web 的本質優點(開放,易於訪問,可索引),
這裡要說明如何在 Chrom 要將 PWA 添加到桌面,當作桌面應用軟體來使用
Continue Reading在 laravel 使用 asset() 來設定一些 public/ 靜態文檔相關位置
在本機主要使用 http,但是更新到正式機需要ssl 憑證
現在有一個情況是,在使用 laravel asset path ,更新到線上主機仍套用 http
底下說明如何在線上及本地切換 http, https
Continue Reading原則上,在 CentOS 6.x 之後,系統就預設安裝 Postfix 服務
Continue Reading在 Linux 環境中,多數軟體都是透過 yum 等套件管理工具進行安裝
對於一些透過社群維護的套件,則可以透過 EPEL ( Extra Packages for Enterprise Linux)來進行安裝
EPEL 是由 Fedora 社群所推出的產品,可以讓我們預先使用一些尚未推出的最新版本,或者是許多在 rpm 官方的 repository 尚未推出
Continue Reading首先,在登入ssh 之後,以下列指令找出過去最新10筆的登入紀錄
last | head
或者可以以用戶名來尋找
last | grep [username]
關於列出的用戶,可以在 IAM 與管理員 > IAM 列表中,進行比對
Continue Reading在SSH連線時,會詢問連線密碼
預設等待時間是 2 分鐘,並且可以修改
首先,開啟sshd_config 設定檔案
vim /etc/ssh/sshd_config
將時間設定為 60 秒
LoginGraceTime 30s
接著重新啟動 ssh server
service sshd restart
yum install httpd -y
vim /etc/sysconfig/iptables
在Linux 環境中,常用 grep 來搜尋文本內容,找出匹配的項目
grep 全寫是 (global search regular expression(RE) and print out the line)
底下介紹 grep 參數用法
Continue Reading假設不考慮 CPU 的情況下,由記憶體評估可承載在線人數估算方法為例:
記憶體 3.6 Gb = 3865470566.4 bps
若以 每人佔用 200 Kb 記憶體來說
1.6G (2G) 記憶體可承載約 8.5 K 進程
1.6*1024*1024*1024/200000 = 8589.934592
3.6G (4G) 記憶體可承載約 19.3 K 進程
3.6*1024*1024*1024/200000 = 19327.35283
Continue Reading
查看目前Apache 目前在線人數
可以透過httpd 進程數量來推算
ps -ef|grep httpd|wc -l
43
若要查看每一筆進程則輸入
ps -ef|grep httpd
apache 3817 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3864 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3924 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3944 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3946 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3949 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3950 2860 0 03:41 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 4017 2860 0 03:42 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 4025 2860 0 03:42 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 4038 2860 0 03:42 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 4051 2860 0 03:42 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 4199 2860 0 03:43 ? 00:00:03 /usr/sbin/httpd -DFOREGROUND
apache 4214 2860 0 03:44 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7368 2860 0 04:10 ? 00:00:02 /usr/sbin/httpd -DFOREGROUND
apache 7406 2860 1 04:10 ? 00:00:02 /usr/sbin/httpd -DFOREGROUND
apache 7493 2860 1 04:11 ? 00:00:02 /usr/sbin/httpd -DFOREGROUND
apache 7591 2860 1 04:12 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7618 2860 1 04:12 ? 00:00:02 /usr/sbin/httpd -DFOREGROUND
apache 7702 2860 0 04:12 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7714 2860 0 04:12 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7717 2860 1 04:12 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7860 2860 0 04:13 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7868 2860 1 04:13 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7879 2860 1 04:13 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7882 2860 0 04:13 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7925 2860 1 04:13 ? 00:00:01 /usr/sbin/httpd -DFOREGROUND
apache 7930 2860 0 04:13 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7931 2860 1 04:13 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7945 2860 1 04:13 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7976 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7992 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7994 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7995 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 7996 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 8015 2860 2 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 8021 2860 0 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 8062 2860 1 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 8063 2860 3 04:14 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 8093 5429 0 04:14 pts/0 00:00:00 grep --color=auto httpd
Continue Reading
在開始介紹 View composer 之前
首先關於 View 的一些用法為,指定 Template 以及要帶入的參數
Continue Reading這裡記錄一些常見的HTTP Response 回應狀態:
Continue ReadingJson Hijacking 是一項已經存在多年的安全漏洞,目前各大主流瀏覽器都已經修補
這裡進行說明,什麼是 Json Hijacking 以及防範方式:
Continue Reading現有一個專案使用到 FFMPEG 來處理 Media 轉換
這裏紀錄 Mac, Ubuntu, CentOS 安裝 FFMPEG 以及簡介使用方式
Continue Reading