Category Archives: 伺服器 網站服務

[Tomcat] allowLinking setting (soft link)

edit the file ‘Tomcat/conf/context.xml’ change to restart Tomcat. Ref. Tomcat軟連接訪問配置symbol link

Posted in Tomcat | Leave a comment

[WordPress] Avoid xmlrpc attack

add below code in the functions.php in your themes.

edit .htaccess

delete the xmlrpc.php file Ref. 解決WordPress被利用xmlrpc.php文件攻擊導致內存超負荷

Posted in WordPress | Leave a comment

S3 CORS setting

Ref: Enabling Cross-Origin Resource Sharing 讓 S3 允許 cross-domain 存取 Amazon S3 CORS headers only show during OPTIONS (preflight) and not during GET request Must set HEAD to avoid from OPTIONS error.

Posted in AWS | Leave a comment

Install aglio in Ubuntu 14.04

Install nodejs Ref. NodeSource Node.js Binary Distributions

Install python

Install aglio Ref. Github : aglio

Posted in Aglio, Ubuntu | Leave a comment

[Git] Git command…

git stash: 暫存機制 git stash: 暫存機制,可保留目前狀態,重新取回其他版本的code git stash clear: 清除所有暫存空間 git stash drop {git status name}: 清除指定的暫存狀態,如果不加參數,則刪除最近的那一個 git stash list: 查看目前暫存列表 git stash apply {git stash name}: 取回暫存的狀態,如果不加參數,則抓取最近的版本 git stash show {git stash name}: 查看指定的暫存與parent差異的部分,如果不加參數,則顯示最近的那一個版本 git stash branch {git stash … Continue reading

Posted in Git | Leave a comment

[Elasticsearch] The health status means…

When we list the indexes, we will get the status information. It shows the health of index in the elasticsearch cluster. green All shards are allocated. yellow The primary shard is allocated but replicas are not. red The specific shard … Continue reading

Posted in Elasticsearch | Leave a comment

[Elasticsearch] List all indexes and optimize it.

When we deleted the indexes, the data were just marked by deleted. We can list all indexes to show status.

It will show the health, index name, pri, rep, docs.count, docs.deleted, store.size, pri.store.size.

If we want to clear … Continue reading

Posted in Elasticsearch | Leave a comment

[Nagios][Cacti] Monitor disk space > 8TB

Because the limitation of snmp, when the disk space is more than 8TB, we will get the wrong value. Whether we use snmpwalk or snmpget, the results are all the same. Therefore, we need to restore the correct value. If … Continue reading

Posted in Cacti, Nagios, SNMP | Leave a comment

[Logstash] Pattern set in grok.

The original warning message is this.

And here is the original server config.

So what we should do is modify the config. Using the match function to replace the pattern, like this.

Posted in Logstash | Leave a comment

[Kibana] Time range search

If I want to search information within these seven days.

If I want to search information between 2015-01-01 and 2015-01-31.

If I want to search information between 2015-02-01 13:00:00 and 2015-02-01 18:00:00.

Posted in Kibana | Leave a comment