2016-01-01から1年間の記事一覧

nginx proxy

real_ip_recursive on nginxで複数のproxyを経由する場合でもアクセス元IPアドレスを取得する - Qiita 2016 proxy_redirect http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect http://www2.matsue-ct.ac.jp/home/kanayama/text/ngin…

FreeBSD ports パッチ

パッチの作り方https://kansai.osaka.jp/freebsd-ports%E3%81%AB%E8%87%AA%E4%BD%9C%E3%83%91%E3%83%83%E3%83%81%E3%82%92%E4%BD%9C%E3%81%A3%E3%81%A6%E5%85%85%E3%81%A6%E3%81%A6%E3%81%BF%E3%82%8B/https://www.freebsd.org/doc/ja_JP.eucJP/books/porter…

windows update 終わらない

「Windows Update がなかなか終わらないな…」と思ったら – Japan WSUS Support Team Blog終わらないWindows Updateを爆速に治した方法 スタンドアロンインストール注意点これらのパッケージをスタンドアロンインストールするときの注意点です。インターネッ…

x-amz- ヘッダ

Amazon S3 REST API のレスポンスに、次のような x-amz- ヘッダが、ユーザの意向に関わらず、必ず含まれます。ユーザからみて、x-amz-id-2 と x-amz-request-id ヘッダに特別な用途や意味はなく、このヘッダとその値は、Amazon がトラブルシューティングなど…

ATS SSL apache 2.2

Forward Secrecy に対応している以下の暗号化スイートを使うこと TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA TLS_ECDHE_ECDSA_WITH_…

Redmine FreeBSD 10.3

Redmineのインストール - Redmineガイドansibleのスクリプト https://github.com/farend/redmine-centos-ansible/nginx + puma + redmine + mysqlFreeBSD 10.2でRedmine 3.1の環境構築(Nginx+Puma+PostgreSQL) - Symfoware Redmine のメール通知で TLS のエ…

負荷テスト、WEBサーバベンチマーク

WEBサイト負荷テストツール7選 | さぶみっと!JAPANDMM insidehttps://github.com/httperf/httperf

varnish grace

Grace Modeとは キャッシュ有効期間(TTLで設定された期間)が過ぎた場合に置いても、 grace期間はキャッシュからレスポンスを返し、バックグラウンドでフェッチし、キャッシュオブジェクトを更新します。 これにより、クライアントにはなるべくキャッシュから…

ipfw + fail2ban

https://nileshgr.com/2013/04/18/securing-freebsd-server-with-fail2ban-and-ipfw → bsd-ipfw で同じことができる。https://forums.freebsd.org/threads/52107/ cat /usr/local/etc/fail2ban/jail.d/sshd-ipfw.conf [sshd-ipfw] enabled = true filter = b…

fail2ban

freebsd ssh filterの確認 fail2ban-regex /var/log/auth.log /usr/local/etc/fail2ban/filter.d/bsd-sshd.conf Nov 13 12:42:18 xxx sshd[29619]: Invalid user ubuntu from 118.179.136.xxx port 39082 port がつく(11.2-RELEASE-p4 )ので ^%(__prefix_lin…

ansible yaml shell command

http://docs.ansible.com/ansible/shell_module.html - name: なにか実行 shell: | echo hoge >> somelog.txt echo foo echo baa args: chdir: somedir/ ansible-playbookのYAMLを読みやすくする工夫 - Qiita shell shellはリモートノードのシェル(/bin/sh)…

wordpress backup to s3

http://blog.hrendoh.com/how-to-backup-wordpress-to-aws-s3/

wordpress http を https に、SSLオフロードは別サーバ

https://codex.wordpress.org/Administration_Over_SSL[WordPress] is_ssl関数を ロードバランサ環境で対応させる : 元うなぎ屋 管理画面のSSL化 wp-config.phpに以下を記載する。 ただしrequire_once(ABSPATH . 'wp-settings.php');より前に書かないとダメ…

FreeBSD varnish-modules

ヘッダファイルなどが必要なのでportを使用 portinstall varnish4 git clone https://github.com/varnish/varnish-modules cd varnish-modules/ https://github.com/varnish/varnish-modules/issues/7 と同じ問題が発生するので vi src/Makefile.am libvmod_…

Corosync Pacemaker

Pacemaker のリソースフェイルオーバーについて - NETWORK ENGINEER BLOG

varnish purge list ban

確認 sudo varnishadm ban.list sudo varnishadm > ban.list ban list は消せない。 No. You cannot clear the ban list. Bans are eliminated from the ban list in only two situations:If they are older then the oldest object stored. They get eaten …

ansible mysql

http://qiita.com/castaneai/items/e7279fadfd594255e73chttp://qiita.com/KisaragiZin/items/e241f189c83580f92e9c

ansible vault

http://docs.ansible.com/ansible/playbooks_vault.html ansible-playbook site.yml --vault-password-file ~/.vault_pass.txt http://qiita.com/takuya599/items/2420fb286318c4279a02 # .ansible.cfg [defaults] vault_password_file = ~/.vault_pass.txt …

ubuntu 16.04 mariadb

0xF1656F24C74CD1D8

awstats

https://blog.e2info.co.jp/2018/09/30/awstats_yum/ 2018 -LogFile=x to change log to analyze whatever is 'LogFile' in config file なので以下のように書ける /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www.example.com -update \ -LogFi…

rsyslog apache ログ集約

http://www.maruko2.com/mw/Apache/%E3%83%90%E3%83%BC%E3%83%81%E3%83%A3%E3%83%AB%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AE%E3%83%AD%E3%82%B0%E3%82%92%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%81%AErsyslog%E3%81%AB%E9%9B%86%E7%B4%84%E3%81%99%E3%82%8B

rsyslog freebsd

制限するLinuxねた帳: rsyslog $AllowedSenderについてBSD-Style blocks will go away in rsyslog v7BSD-Style blocks will go away in rsyslog v7 syslog grep -v '^\s*#' /etc/syslog.conf *.err;kern.warning;auth.notice;mail.crit /dev/console *.notic…

vanish ログ

varnishncsa virtualhost ログ varnishncsaでホスト毎にログを保存する – cat /dev/random > /dev/null & varnishncsa -q "ReqHeader:Host ~ '^example.com$'" virtualhost用のvarnishncsa起動スクリプトhttps://github.com/kurita0/varnish4-freebsd/blob/m…

varnish backend health check

GETをHEADにする。Hostを入れる場合は request を使う backend server1 { # Define one backend .host = "127.0.0.1"; # IP or Hostname of backend .port = "80"; # Port Apache or whatever is listening .max_connections = 300; # That's it .probe = { …

varnish 4 https ssl nginx

https -> SSL Temination (nginx) -> Cache (varnish) -> web (nginx) http -> Cache (varnish) -> web (nginx)https://www.digitalocean.com/community/tutorials/how-to-configure-varnish-cache-4-0-with-ssl-termination-on-ubuntu-14-04 Varnish は HTT…

varnish virtual host

http://verticalprogramming.com/2013/09/15/varnish-virtual-host-boilerplate The "(req.http.host == "example1.com") " Pattern:http://stackoverflow.com/questions/3334023/configure-multiple-sites-with-varnish https://github.com/mattiasgeniar/v…

nginx ssl

安全性 NginxでSSLの評価をA+にする手順 | 9mのパソコン日記https://michael.lustfield.net/nginx/getting-a-perfect-ssl-labs-score openssl dhparam -out /usr/local/etc/nginx/ssl/dhparam.pem 4096 nginx.conf ssl_dhparam ssl/dhparam.pem; 確認 https:…

OpenStack HA 高可用

http://www.slideshare.net/VirtualTech-JP/openstackansibleopenstack-ha-openstack-20163

neutron

http://docs.openstack.org/juno/install-guide/install/apt/content/figures/1/a/common/figures/installguidearch-nova-services.png ↑ junohttp://docs.openstack.org/mitaka/install-guide-ubuntu/_images/network1-services.png ↑ mitakahttps://www.op…

Let's Encrypt letsencrypt

https://certbot.eff.org/docs/using.htmlhttp://www.mumpk.com/tech/2015/12/21/get-certificate-with-lets-encrypt/Let’s Encrypt サーバー証明書の取得と自動更新設定メモ | あぱーブログ メールアドレス Let's Encrypt (Certbot) に登録したメールアドレ…