カテゴリ: Linux

AWSLinux
2025-01-15 12:02 (13 months ago)

sudo snap aws-cli だと aws cli v2 がインストールされる時、強制的に v1 を指定してインストールする方法です。

Linux
2024-06-13 03:09 (20 months ago)

Ubuntu 22 に Google Chrome For Testing 126 と chromedriver 126 をインストールしたメモです。

DockerLinux
2022-06-12 02:55 (3 years ago)

ssh コマンドの引数で docker run しようとした時、ssh docker run the input device is not a TTY が出る場合、ssh に -t オプションをつければ良い

Linux
2021-02-01 02:17 (5 years ago)

PC を構築して Ubuntu インストール後、LVM の論理パーティションがストレージいっぱいまで使われてなかったので拡張した。

Linux
2017-06-06 10:56 (8 years ago)

Ubuntu に ChromeDriver をインストールする手順書です。

Linux
2017-02-03 00:40 (9 years ago)

ubuntu で Selenium を Python から動かそうとして

DjangoLinux
2016-09-16 03:24 (9 years ago)

元々はAWS ELB -> Apache2 -> mod_wsgi という構成だったが、AWS ELB -> Apache2 -> uwsgi と、Djangoサーバを uwsgi に変えたら、ログインフォームを送信する時など、django csrf 認証に失敗するようになった。DEBUG = True で見てみるとアクセス禁止 (403)CSRF検証に失敗したため、リクエストは中断されました。HelpReason given for failure:    Referer checking failed - https://example.com.com/some-path/ does not match any trusted origins.    In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django's CSRF mechanism has not been used correctly. For POST forms, you need to ensure:    Your browser is accepting cookies.    The view function passes a request to the template's render method.    In the template, there is a {% csrf_token %} template tag inside each POST form that targets an internal URL.    If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views that use the csrf_token template tag, as well as those that accept the POST data.You're seeing the help section of this page because you have DEBUG = True in your Django settings file. Change that to False, and only the initial error message will be displayed.You can customize this page using the CSRF_FAILURE_VIEW setting.ELB で HTTPS を受け、Apache には 80 でリクエスト、uwsgi は HTTP プロトコルをリッスンしている(uwsgiプロトコルではない)Apacheの設定はProxyPass / http://127.0.0.1:8081/ProxyPassReverse / http://127.0.0.1:8081/Alias /static/ /var/django/xxxxx/staticfiles/ProxyPass /static/ !こんな感じ。Django のコードを検索してみるとcsrf.pyREASON_BAD_REFERER = "Referer checking failed - %s does not match any trusted origins."こうなっていて、コードを読んで見ると CSRF_TRUSTED_ORIGINS にドメインを入れれば良いっぽい。CSRF_TRUSTED_ORIGINS = [".example.com"] これで良い

Linux
2015-09-08 11:56 (10 years ago)

cd /tmp/ wget "http://dev.mysql.com/get/mysql-apt-config_0.3.5-1ubuntu14.10_all.deb" sudo dpkg -i mysql-apt-config_0.3.5-1ubuntu14.10_all.deb # Server -> MySQL 5.6 -> Apply sudo apt-get update sudo apt-cache policy mysql-server sudo apt-get install mysql-server (再設定: sudo dpkg-reconfigure mysql-apt-config )

Linux
2015-06-11 06:28 (10 years ago)

この記事 http://b.ytyng.com/a-61/ で書きましたが、OpenSSL 1.0.1f で https 接続した場合、TLS1.2 で 接続しようとして hello を発行した時、特定のサイトが応答で固まることがあります。

Linux
2015-06-11 05:50 (10 years ago)

特定のwebサーバーと、OpenSSL 1.0.1a 〜 OpenSSL 1.0.1f のバージョンで、TLS1.2 で通信をしようとすると OpenSSLが固まることがあります。

Linux
2015-05-13 01:35 (10 years ago)

$1 の、末尾の / を除去

Linux
2014-04-07 09:49 (11 years ago)

Cent OS 5.9 に、Redmine を入れようとした。

Linux
2013-08-03 01:29 (12 years ago)

社内の情報共有サービスを Wiki で作ろうと思ったのですが、 開発者以外も使うとすると WYSIWIG なエディタを搭載したものが良いと思いました。

アーカイブ