スマフォ用サイト


スマフォ用サイトのQRコード

このページを共有


今月のカレンダー



1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

カテゴリ一覧

ただの日記(965)
原付生活(3)
子育て日記(11)
PC関連(11)
もろもろ日記(908)

競馬+POG(1589)
当たらない予想と反省会(707)
POGネタ(58)
競馬について考える(18)
競馬もろもろ(219)
ダービーウィーク!(14)
2011年競馬場訪問記(27)
2012年競馬場訪問記(53)
2013年競馬場訪問記(61)
2014年競馬場訪問記(40)
2015年競馬場訪問記(44)
2016年競馬場訪問記(25)
2017年競馬場訪問記(36)
2018年競馬場訪問記(39)
2019年競馬場訪問記(34)
2020年競馬場訪問記(24)
2021年競馬場訪問記(37)
2022年競馬場訪問記(51)
2023年競馬場訪問記(70)
2024年競馬場訪問記(17)
地方競馬馬主(5)
ひとくち馬主(3)

ホームページ製作(366)
PHPの備忘録(13)
CSSの備忘録(5)
JavaScriptの備忘録(2)
ホームページもろもろ(287)
Flashの備忘録(12)
管理人の備忘録(21)
スマフォ用サイト作成(19)

自宅サーバ(360)
FreeBSD(17)
Apache(4)
PHP(5)
MySQL(17)
サーバもろもろ(145)
障害連絡(131)
リニューアルプロジェクト 2011-2012(41)

お仕事(48)
お仕事(48)

旅の記録・水曜どうでしょう関連(43)
水曜どうでしょう(11)
2009年四国お遍路(6)
2009年アンコールワット(5)
2010年ベトナム(3)
2010年いっそ九州(5)
2010年北海道179市町村(5)
2011年春の一人旅(2)
2011年四国お遍路(6)


先月までのネタ

2024年
2024年3月(4)
2024年2月(8)
2024年1月(13)

2023年
2023年12月(11)
2023年11月(8)
2023年10月(10)
2023年9月(7)
2023年8月(9)
2023年7月(10)
2023年6月(6)
2023年5月(10)
2023年4月(5)
2023年3月(4)
2023年2月(6)
2023年1月(6)

2022年
2022年12月(9)
2022年11月(8)
2022年10月(5)
2022年9月(5)
2022年8月(2)
2022年7月(6)
2022年6月(9)
2022年5月(3)
2022年4月(3)
2022年3月(4)
2022年2月(7)
2022年1月(5)

2021年
2021年12月(8)
2021年11月(9)
2021年10月(4)
2021年9月(3)
2021年8月(2)
2021年7月(6)
2021年6月(12)
2021年5月(2)
2021年4月(8)
2021年3月(2)
2021年2月(7)
2021年1月(2)

2020年
2020年12月(8)
2020年11月(3)
2020年10月(4)
2020年9月(1)
2020年8月(2)
2020年7月(7)
2020年6月(6)
2020年5月(9)
2020年4月(11)
2020年3月(8)
2020年2月(5)
2020年1月(9)

2019年
2019年12月(4)
2019年11月(5)
2019年10月(7)
2019年9月(2)
2019年8月(2)
2019年7月(8)
2019年6月(2)
2019年5月(3)
2019年4月(2)
2019年3月(4)
2019年2月(3)
2019年1月(1)

2018年
2018年12月(8)
2018年11月(5)
2018年10月(10)
2018年9月(6)
2018年8月(1)
2018年7月(7)
2018年6月(5)
2018年5月(7)
2018年4月(19)
2018年3月(3)
2018年2月(3)
2018年1月(11)

2017年
2017年12月(14)
2017年11月(11)
2017年10月(18)
2017年9月(18)
2017年8月(21)
2017年7月(29)
2017年6月(26)
2017年5月(23)
2017年4月(18)
2017年3月(11)
2017年2月(11)
2017年1月(16)

2016年
2016年12月(25)
2016年11月(24)
2016年10月(30)
2016年9月(15)
2016年8月(16)
2016年7月(15)
2016年6月(18)
2016年5月(30)
2016年4月(28)
2016年3月(29)
2016年2月(26)
2016年1月(32)

2015年
2015年12月(30)
2015年11月(29)
2015年10月(30)
2015年9月(27)
2015年8月(28)
2015年7月(28)
2015年6月(28)
2015年5月(29)
2015年4月(30)
2015年3月(28)
2015年2月(26)
2015年1月(29)

2014年
2014年12月(31)
2014年11月(28)
2014年10月(31)
2014年9月(29)
2014年8月(29)
2014年7月(31)
2014年6月(31)
2014年5月(30)
2014年4月(30)
2014年3月(28)
2014年2月(27)
2014年1月(31)

2013年
2013年12月(29)
2013年11月(27)
2013年10月(29)
2013年9月(27)
2013年8月(28)
2013年7月(28)
2013年6月(29)
2013年5月(29)
2013年4月(30)
2013年3月(26)
2013年2月(24)
2013年1月(29)

2012年
2012年12月(28)
2012年11月(27)
2012年10月(28)
2012年9月(30)
2012年8月(31)
2012年7月(33)
2012年6月(32)
2012年5月(33)
2012年4月(35)
2012年3月(30)
2012年2月(27)
2012年1月(31)

2011年
2011年12月(25)
2011年11月(25)
2011年10月(28)
2011年9月(28)
2011年8月(28)
2011年7月(28)
2011年6月(27)
2011年5月(26)
2011年4月(16)
2011年3月(9)
2011年2月(11)
2011年1月(9)

2010年
2010年12月(12)
2010年11月(11)
2010年10月(8)
2010年9月(13)
2010年8月(10)
2010年7月(20)
2010年6月(6)
2010年5月(9)
2010年4月(2)
2010年3月(3)
2010年2月(5)
2010年1月(8)

2009年
2009年12月(9)
2009年11月(2)
2009年10月(4)
2009年9月(3)
2009年8月(1)
2009年7月(9)
2009年6月(3)
2009年5月(14)
2009年4月(10)
2009年3月(11)
2009年2月(9)
2009年1月(10)

2008年
2008年12月(1)
2008年11月(1)
2008年10月(1)
2008年9月(5)
2008年8月(1)
2008年7月(1)
2008年6月(2)
2008年5月(1)
2008年4月(1)
2008年3月(2)
2008年2月(7)
2008年1月(7)

2007年
2007年12月(11)
2007年11月(7)
2007年10月(8)
2007年9月(12)
2007年8月(11)
2007年7月(5)
2007年6月(16)
2007年5月(8)
2007年4月(2)
2007年3月(14)
2007年2月(2)
2007年1月(8)

2006年
2006年12月(4)
2006年11月(6)
2006年10月(7)
2006年9月(10)
2006年8月(9)
2006年7月(20)
2006年6月(13)
2006年5月(3)

2005年
2005年9月(13)
2005年8月(13)
2005年7月(18)
2005年6月(24)
2005年5月(26)
2005年4月(26)
2005年3月(27)
2005年2月(22)
2005年1月(26)

2004年
2004年12月(29)
2004年11月(29)
2004年10月(26)
2004年9月(23)
2004年8月(12)


最近よく読まれてるネタ



Excel VBAで「SPAT4自動投票システム」を作ってみました。
(2020年7月19日のネタ:72回)

春の岩手競馬開幕! の水沢競馬場へ行ってきました。
(2024年3月10日のネタ:41回)

昨日は船橋競馬場 へ行ってきました。
(2024年3月6日のネタ:32回)

G1予想大会の結果を掲載しました(…即席ですが)
(2011年4月25日のネタ:26回)

「The Sunday Breeze」から、1年ぶりに重大なお知らせです。
(2012年10月12日のネタ:20回)

…来週から、週末予想のタイトルが変わります(…今年初?の祝勝会。)
(2012年5月13日のネタ:20回)

管理人の当たらないG1予想!皐月賞編!
(2012年4月14日のネタ:20回)

明日はダートの祭典・JBC!管理人の当たらない予想!(連続現地観戦は4年でストップ)
(2015年11月2日のネタ:19回)

昨日の水沢競馬場 遠征の帰り道、今日はちょこっと川崎競馬場 へ寄ってきました。
(2024年3月11日のネタ:18回)

【お知らせ】 「The Sunday Breeze」管理人から、皆様に重大なお知らせがございます。
(2015年10月9日のネタ:18回)



最近のコメント



今日は改修工事真っ只中の #京都競馬場 (パークウインズ京都競馬場)へ行ってきました。(チョネ)

本日は笠松競馬場へ行ってきました。(あいべ)

管理人の今年の目標が一つ増えました…。(あああ)

まあそんなに書くことはありませんが…。(momo)

【管理人からご挨拶】 『The Sunday Breeze』は5月25日に開設19周年を迎えます。(アオヤギ)

4月からスタートする「Sunday Breeze POG!」の一部ルール追加について。(アオヤギ)

昨日「Sunday Breeze賞」の観戦に帯広競馬場へ行ってきました。(白イチゴ)

本日5月25日、「The Sunday Breeze」は18回目の誕生日を迎えました。(アオヤギ)

【「G1予想大会」プレリリース終了】皆様のご協力、本当にありがとうございました。(アオヤギ)

【再度お知らせとお願い】今週からの「G1予想大会」、新機能プレリリースを公開中です。(白イチゴ)



ネタの検索



管理人の競馬観戦記録


(2024年)

JRA中山競馬場
1月6日 (中山金杯)
1月14日 (京成杯)
3月2日 (オーシャンS)

JRA小倉競馬場
1月27日

水沢競馬場
3月10日 (奥州弥生賞)

船橋競馬場
1月17日 (ブルーバードC)
1月19日
2月9日
3月5日

川崎競馬場
1月5日
3月11日

笠松競馬場
1月25日

名古屋競馬場
1月19日

姫路競馬場
1月26日

高知競馬場
2月25日 (レジーナディンヴェルノ賞)

佐賀競馬場
1月28日

2012年以降の競馬観戦インデックス


管理人の競馬家計簿


(最近14日分)

2024年3月5日船橋
43勝  回収率:378.4%

2024年3月5日高知
10勝  回収率:0.0%

2024年3月6日船橋
10勝  回収率:0.0%

2024年3月6日高知
10勝  回収率:0.0%

2024年3月7日船橋
10勝  回収率:0.0%

2024年3月8日船橋
21勝  回収率:173.8%

2024年3月9日中山
61勝  回収率:57.9%

2024年3月9日中京
41勝  回収率:84.5%

2024年3月9日阪神
101勝  回収率:24.3%

2024年3月10日中京
10勝  回収率:0.0%

2024年3月10日水沢
82勝  回収率:46.2%

2024年3月10日高知
10勝  回収率:0.0%

2024年3月11日川崎
60勝  回収率:30.3%

2024年3月11日高知
10勝  回収率:0.0%

2024年3月14日川崎
10勝  回収率:0.0%

2024年3月16日中山
11勝  回収率:330.0%

2024年3月16日中京
11勝  回収率:150.0%

2024年3月16日阪神
91勝  回収率:28.8%

2024年3月17日中山
11勝  回収率:125.0%

2024年3月17日阪神
10勝  回収率:0.0%

2024年3月17日帯広
11勝  回収率:153.3%

2024年合計
32569
勝率:21.2%  回収率:66.3%
(万馬券:5本的中)

2023年合計
1772537
勝率:30.3% 回収率:71.2%
(万馬券:11本的中)

2022年合計
2097563
勝率:26.8% 回収率:66.4%
(万馬券:29本的中)

2021年合計
2147527
勝率:24.5% 回収率:67.8%
(万馬券:24本的中)

2020年合計
3046684
勝率:22.5% 回収率:65.2%
(万馬券:39本的中)

2019年合計
1438346
勝率:24.1% 回収率:68.2%
(万馬券:39本的中)

2018年合計
1488367
勝率:24.7% 回収率:75.1%
(万馬券:39本的中)


管理人のつぶやき


(皆様のフォローをお願いします。)

@sunday_breeze からのツイート
「自宅サーバ」の「Apache」ネタは、全部で4件あります。

韓国から攻撃を受けています。

ここ2日くらいですが、
えらい勢いで

220.95.235.165
220.95.235.166
220.95.235.176
220.95.235.177

からのアクセス(攻撃?)が続いています。

韓国籍です。

昨日1日でおよそ4000ほどアクセスしているようです。

SSHでの不正ログイン等は行っていないようで、
IP拒否はしていない様子。

その影響かわかりませんが
out of swap spaceで
MySQLやApacheのプロセスが数回落ちています。

swap_pager_getswapspace(3): failed
pid 2278 (libhttpd.ep), uid 1001, was killed: out of swap space
pid 77232 (mysqld), uid 2000, was killed: out of swap space

昨年10月11日のネタでも書きましたが、
不正アクセス(というかアジア諸国)に対して、
本格的にアクセス制限をかけないとダメかもしれません。


[コメント読む(0)]  人気ブログランキングへ 

mod_becomeについて。

メールにて、ご質問をいただきました。

-----
通りすがりのもので、サーバ構築プロジェクトを拝見しました。
mod_becomeって何の為にインストールされているのでしょうか?

エリザベスですが、
1.スイープトウショウ
2.カワカミプリンセス
3.アサヒライジング
で堅そうです(^^)
-----

うちのサーバはですね、
「The Sunday Breeze」「再構築プロジェクト」「3連単予想」だけではなく、
会社の先輩のページ、後輩のページ、そして仲間内のページと
合計4ドメイン、7つのサイトがあるんです。

なので、それぞれのユーザでApacheを起動させたいな、と思って
mod_becomeを導入しています。

って、こんな回答でよかったですか??

ちなみにエリザベス女王杯は
川上さんは消そうかな。。。
ディアデラノビアとスイープとアドマイヤキッス?
アサヒライジングも面白そう。シェルズレイの一発期待。
サンレイジャスパーも魅力的。
んー。まだ悩んでます(笑)

[コメント読む(0)]  人気ブログランキングへ 

Apache1.3.36+mod_ssl2.8.27のインストール&初期設定。


# fetch http://www.modssl.org/source/mod_ssl-2.8.27-1.3.36.tar.gz
# fetch http://www.apache.jp/dist/httpd/apache_1.3.36.tar.gz
# tar zxvf mod_ssl-2.8.27-1.3.36.tar.gz
# tar zxvf apache_1.3.36.tar.gz
# cd mod_ssl-2.8.27-1.3.36
# env CFLAGS="-DBIG_SECURITY_HOLE"
? ./configure
? --with-apache=../apache_1.3.36
? --with-ssl=/usr/local
? --enable-rule=SHARED_CORE
? --with-layout=Apache
? --enable-module=so
? --enable-module=ssl
? --enable-module=rewrite
? --enable-shared=rewrite

Configuring mod_ssl/2.8.27 for Apache/1.3.36
+ Apache location: ../apache_1.3.36 (Version 1.3.36)
+ OpenSSL location: /usr/local
+ Auxiliary patch tool: ./etc/patch/patch (local)
+ Applying packages to Apache source tree:
o Extended API (EAPI)
o Distribution Documents
o SSL Module Source
o SSL Support
o SSL Configuration Additions
o SSL Module Documentation
o Addons
Done: source extension and patches successfully applied.

Configuring for Apache, Version 1.3.36
+ using installation path layout: Apache (config.layout)




(中略)




Now proceed with the following commands:
$ cd ../apache_1.3.36
$ make
$ make certificate
$ make install

上記のとおりに


# cd ../apache_1.3.36
# make

===> src
===> src/regex
sh ./mkh -i _REGEX_H_ regex2.h regcomp.c regerror.c regexec.c regfree.c > ../include/hsregex.h



(中略)



+---------------------------------------------------------------------+
| Before you install the package you now should prepare the SSL |
| certificate system by running the 'make certificate' command. |
| For different situations the following variants are provided: |
| |
| % make certificate TYPE=dummy (dummy self-signed Snake Oil cert) |
| % make certificate TYPE=test (test cert signed by Snake Oil CA) |
| % make certificate TYPE=custom (custom cert signed by own CA) |
| % make certificate TYPE=existing (existing cert) |
| CRT=/path/to/your.crt [KEY=/path/to/your.key] |
| |
| Use TYPE=dummy when you're a vendor package maintainer, |
| the TYPE=test when you're an admin but want to do tests only, |
| the TYPE=custom when you're an admin willing to run a real server |
| and TYPE=existing when you're an admin who upgrades a server. |
| (The default is TYPE=test) |
| |
| Additionally add ALGO=RSA (default) or ALGO=DSA to select |
| the signature algorithm used for the generated certificate. |
| |
| Use 'make certificate VIEW=1' to display the generated data. |
| |
| Thanks for using Apache & mod_ssl. Ralf S. Engelschall |
| rse@engelschall.com |
| www.engelschall.com |
+---------------------------------------------------------------------+
<=== src

サーバの秘密鍵と証明書申請データ(CSR)はあとで作るとして、
証明書は無償の認証局CACertで発行してもらったものがあります。
旧サーバのものを持ってきて、

# make certificate TYPE=existing CRT=証明書のパス

SSL Certificate Generation Utility (mkcert.sh)
Copyright (c) 1998-2000 Ralf S. Engelschall, All Rights Reserved.

Using existing custom certificate [EXISTING]
______________________________________________________________________

RESULT: Server Certification Files

o conf/ssl.key/server.key
The PEM-encoded DSA private key file which you configure
with the 'SSLCertificateKeyFile' directive (automatically done
when you install via APACI). KEEP THIS FILE PRIVATE!

o conf/ssl.crt/server.crt
The PEM-encoded X.509 certificate file which you configure
with the 'SSLCertificateFile' directive (automatically done
when you install via APACI).

Congratulations that you establish your server with real certificates.


# make install

===> [mktree: Creating Apache installation tree]
./src/helpers/mkdir.sh /usr/local/apache/bin
mkdir /usr/local/apache
mkdir /usr/local/apache/bin



(中略)



+--------------------------------------------------------+
&#124; You now have successfully built and installed the &#124;
&#124; Apache 1.3 HTTP server. To verify that Apache actually &#124;
&#124; works correctly you now should first check the &#124;
&#124; (initially created or preserved) configuration files &#124;
&#124; &#124;
&#124; /usr/local/apache/conf/httpd.conf
&#124; &#124;
&#124; and then you should be able to immediately fire up &#124;
&#124; Apache the first time by running: &#124;
&#124; &#124;
&#124; /usr/local/apache/bin/apachectl start
&#124; &#124;
&#124; Or when you want to run it with SSL enabled use: &#124;
&#124; &#124;
&#124; /usr/local/apache/bin/apachectl startssl
&#124; &#124;
&#124; Thanks for using Apache. The Apache Group &#124;
&#124; http://www.apache.org/ &#124;
+--------------------------------------------------------+

ってな感じでしょうか。

サーバの秘密鍵を作ります。

# openssl genrsa -rand 適当 -out server.key -des3 1024

0 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
.....................................................++++++
........................................................................++++++
e is 65537 (0x10001)
Enter pass phrase for server.key:パスワード
Verifying - Enter pass phrase for server.key:パスワード

このままだと、Apache起動時にいつもパスワードを聞かれます。
なので、

# openssl rsa -in server.key -out server.key

Enter pass phrase for server.key:パスワード
writing RSA key

とすると、聞かれなくなります。

次にCSRを作ります。

# openssl req -new -days 365 -key server.key -out server.csr

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Kanagawa
Locality Name (eg, city) []:Chigasaki
Organization Name (eg, company) [Internet Widgits Pty Ltd]:The Sunday Breeze
Organizational Unit Name (eg, section) []:webmaster
Common Name (eg, YOUR name) []:www.sundaybreeze.jp
Email Address []:メールアドレス@sundaybreeze.jp

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

そうすると、
-rw-r--r-- 1 root wheel 745 Jul 12 12:41 server.csr
-rw-r--r-- 1 root wheel 887 Jul 12 12:36 server.key
こんな感じ。
どちらもパーミッションは400にしちゃいましょう。

で、
server.csrはApacheルート/conf/ssl.csr/へ
server.keyはApacheルート/conf/ssl.key/へ
移動します。
証明書自体はApacheルート/conf/ssl.crt/にあります。

証明書作ったときのCSRじゃなくていいのかな?
まあいいや。

httpd.confは旧サーバのものをそのまま使います。

configファイルの妥当性チェックは

# Apacheルート/bin/apachectl configtest

でできます。が、
まだmod_becomeやらPHPやらをインストールしていないのでエラーが出ます。
これはまた後日。

Apacheの起動シェルは
/usr/local/etc/rc.d
にある。はず。なのに。ない。なんで?

なので、邪道ですが

# cd /usr/port/www/apache13
# make

としてportsでmakeまでして、
出来上がった
/usr/ports/www/apache13/work/apache_1.3.36/apache.sh
を/usr/local/etc/rc.dにコピーしました。
もちろん起動コマンド等修正が必要です。

で、/etc/rc.confに
apache_enable="YES"
を追記してrebootすれば起動する、はず。

[コメント読む(0)]  人気ブログランキングへ 

全部が手作りなんです。

だから、サーバ周りのメンテも
しなくちゃいけないんです。

まあ、それがある意味「自宅サーバの楽しみ」でもあるんですけどね。

さて。久々に「自宅サーバ」ネタ。
備忘録もかねて、技術的なことを書いていきます。

1:blogの人気ランキングに参加し始めました。

自宅サーバとはまったく関係ない(笑)
でも、こういうのがあると、どんどん発展するってもんだ。
右下にある「blog Ranking」ってバナー。
ぜひクリックを。

最新記事をランキングのページに送信するように作りました。
2分で。
でも、反映されていないようです。。。
どちらに原因があるかは、もう少し様子を見ます。。。
そして、これから「RSS」について、勉強します。。。
そもそもRSSってなんだ??

2:本格的にトラックバックできるようにします。

まあ、1をはじめたってこともあるんですけどね。
でもこれ、Webサーバのリブートがいるので、
すぐには無理です(笑) 今夜にでも。。。

sundaybreeze.jpは全部PHPでできてます。アドレスはhtmlなんですけどね。
トラックバックPingを受けるページもPHPで作ってますが、
トラックバックURLに「・・・.php?・・・」って出ちゃうのはちょっとかっこ悪いので、
うちでは、こんな感じにしてます。

Apacheのコンフィグファイルhttpd.conf
LoadModule rewrite_module libexec/mod_rewrite.so
なんて書いて、(もちろん書いた場所に、そのファイルも置きます)
RewriteEngine On
RewriteRule ^/([^/].+)\.html$ /$1.php [S]
RewriteRule ^/trackback?(.+)$ /trackback.php?l_date=$1 [S]

なんてことをしてます。

これは、2行目で
「・・・・.html」ってリクエストは、すべて「・・・・.php」に変換しろ!
って事なんです。なので、3行目も「trackback?・・・・」は実際は「trackback.php?l_date=・・・・」なんじゃ!
ということなんです。(バラしていいのか?)
もちろん、コンフィグファイルなんで
Apacheをリブートしないと、設定は反映されません。
今夜やります。。。

3:blogのWebログ(?)を別にしなきゃ!

意味わかんないですね。blog.sundaybreeze.jpにアクセスされたログです。
まあ、今までは相当適当に(笑)運営してきたので、
sundaybreeze.jpのログと一緒にとってたんです。
ただまあ、これも1をはじめたって事もあって、
ちゃんとアクセスログ解析しなきゃってことで。

これもApacheの設定なので、帰ってからやります。。。
設定方法は、2と同じ、httpd.confを書き換えてます。

バーチャルホストの設定で
ServerAdmin webmaster@sundaybreeze.jp
DocumentRoot "/hogehoge/blog"
ServerName blog.sundaybreeze.jp
ErrorLog /hoge/blog_error_log
CustomLog "|/apacheのbin/rotatelogs /loglog/blog_access_log 86400"
CustomLog "|/apacheのbin/rotatelogs /loglog/blog_worm_log 86400"

ってな感じです。

今夜やることいっぱい。
さて、明日にはどう変わっているのかな?
競馬ランキング[人気blogランキング]
[コメント読む(0)]  人気ブログランキングへ