自分のメモとして残している公開用Redmine『クーケン島観光ガイド』の404.htmlファイルを差し替えた時のメモです。
環境
- Ubuntu 24.04
- Apache 2.4
- ruby 3.2.3
- MySQL
- Redmine 5.1
htmlファイル作成
これに関しては自分の好みに合わせました。
- Redmineの概要や特徴を
- 英国のタブロイド紙『The Sun』のような文体で
- 和訳付きで書いて欲しい
- その際、フォントはRedmineのテーマ『こどもれっどまいん』のものをそのまま使う
を条件にGoogle AI「Gemini」に作成いただきました。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>404 Not Found</title>
<style>
/* 通常のフォント */
@font-face {
font-family: 'kiloji';
src: url('/themes/redmine_theme_kodomo/font/kiloji/kiloji.woff') format('woff'),
url('/themes/redmine_theme_kodomo/font/kiloji/kiloji.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* 太字のフォント */
@font-face {
font-family: 'kiloji';
src: url('/themes/redmine_theme_kodomo/font/kiloji/kiloji_b.woff') format('woff'),
url('/themes/redmine_theme_kodomo/font/kiloji/kiloji_b.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
body {
font-family: 'kiloji', sans-serif;
text-align: center;
background-color: #f8f8f8; /* 背景色を少し明るく */
color: #333; /* 文字色を濃いグレーに */
padding: 20px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold; /* 見出しを太字に */
color: #c00; /* 見出しの色を赤に */
margin-bottom: 0.5em;
}
h2 {
font-size: 1.8em;
margin-top: 2em;
border-bottom: 2px solid #c00; /* 下線を追加 */
padding-bottom: 0.2em;
}
h3{
font-size: 1.4em;
margin-top: 1.5em;
}
p {
font-size: 1.1em;
line-height: 1.6;
margin-bottom: 1em;
}
/* 箇条書き */
ul{
list-style: none;
}
.bold {
font-weight: bold;
}
.container {
max-width: 800px;
margin: 0 auto;
background-color: white;
padding: 40px;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
border-radius: 12px;
}
/* リンク */
a{
text-decoration: none;
color: blue;
}
</style>
</head>
<body>
<div class="container">
<h1>RED-HOT REDMINE: THE PROJECT PANACEA! (AND IT WON'T COST YOU A PENNY!)</h1>
<p>(和訳: 見出し:プロジェクト管理を激アツに!Redmineは万能薬だ!しかも、一銭もかからない!)</p>
<h2>PAGE 3: WHAT IN THE BLAZES IS REDMINE? (AND WHY IS IT FREE AS A BIRD?)</h2>
<p>Cor blimey, you've been living under a rock, ain't ya? Redmine's the <span class="bold">FREE</span>, open-source gaffer that sorts out all your project headaches. Think of it like a Swiss Army Knife for your work – it's got the lot! Tracking bugs, sorting deadlines, sharing files... it's like having a super-organised PA who never nicks your biscuits. And the best bit? It's <span class="bold">FREE as a bird!</span> No dodgy subscriptions, no hidden costs, no sneaky charges that'll leave you skint. It's open-source, meaning a bunch of clever clogs got together and built it for the good of humanity (and probably because they were bored). Bob's your uncle!</p>
<p>(Page 3: Redmineって一体何者!? (しかも、なんでタダなの!?))</p>
<p>おいおい、今までどこに隠れてたんだ?Redmineは、<span class="bold">無料</span>でオープンソースの、プロジェクトの悩みを全部解決してくれる頼れるヤツだ。仕事用のスイスアーミーナイフみたいなもんだと思えばいい – 何でもござれ!バグの追跡、締め切りの管理、ファイルの共有… まるで、あなたのビスケットを盗まない超有能な秘書がいるみたいだろ? しかも最高なは、<span class="bold">鳥のように自由(無料)</span>ってこと!怪しいサブスクも、隠れた費用も、一文無しになるようなコソコソした請求も一切なし。オープンソースだから、賢い連中が集まって、人類のために作ったんだ(多分、暇だったんだろうけど)。超簡単だろ!</p>
<h2>PAGE 5: GET YOUR MITTS ON IT! (HOW TO USE IT AND MAKE IT YOUR OWN)</h2>
<p>Right, listen up, 'cause this is important. First, you gotta get it installed. It's a bit techy, like setting up your Sky box, but there's loads of guides online. Once it's up and running, you create "projects". Then you chuck in your "issues". Assign 'em to your team, set deadlines, and watch the magic happen!</p>
<p>But here's the <em>really</em> clever bit: Redmine's like a lump of Play-Doh. You can mould it into whatever shape you want! <span class="bold">That's the beauty of open-source – you can tinker with it 'til your heart's content!</span> Fancy a new feature? Get stuck in and code it yourself (or find a friendly geek to do it for you). Want to change the colours to match your favourite football team? Go for it! It's all yours to play with!</p>
<p>(和訳: 5ページ目:Redmineをゲットせよ!(使い方と自分だけのものにする方法))</p>
<p>よーく聞けよ、こっからが重要だ。まず、インストールしなきゃいけない。Skyのセットトップボックスを設定するみたいに、ちょっと技術的なんだが、ネット上にガイドは山ほどある。インストールが終わったら、「プロジェクト」を作る。そしたら、「課題」をぶち込む。チームに割り当てて、締め切りを設定して、あとは魔法が起こるのを待つだけ!</p>
<p>でも、<span class="bold">本当に</span>すごいのはここからだ。Redmineは、まるでPlay-Doh(粘土)の塊みたいなんだ。好きな形に作り変えられる!<span class="bold">これがオープンソースの素晴らしいところ – 心ゆくまでいじくり回せるんだ!</span> 新しい機能が欲しい?自分でコードを書いて追加しちゃえ(または、親切なギークに頼むんだ)。好きなサッカーチームに合わせて色を変えたい? やっちゃえ! 全部、あなたの自由だ!</p>
<h2>PAGE 7: FEATURES FIT FOR A KING (OR QUEEN!) (AND YOU CAN ADD YOUR OWN!)</h2>
<p>This ain't no Mickey Mouse software, mate. Redmine's packed with features that'll make your jaw drop:</p>
<ul>
<li><span class="bold">Issue Tracking:</span> Like a bloodhound on the scent, it finds and squashes bugs faster than you can say "Coronation Chicken".</li>
<li><span class="bold">Gantt Charts:</span> See your project timeline laid out like a football pitch. Know exactly when you're gonna score that winning goal (or finish the project!).</li>
<li><span class="bold">Wiki:</span> A shared brain for your team. Stick all your important info in there, from meeting notes to the recipe for Aunt Mildred's famous flapjacks.</li>
<li><span class="bold">Forums:</span> Chat with your team, discuss ideas, and generally have a good old natter.</li>
<li><span class="bold">Time Tracking:</span> See where your precious hours are going. No more slacking off!</li>
<li><span class="bold">Custom Fields:</span> Make Redmine your own! Add whatever info you need, like "Biscuit Preference" or "Favourite Spice Girl". <span class="bold">And if that's not enough, you can add <em>even more</em> custom fields 'til the cows come home!</span></li>
<li><span class="bold">Multiple Project Support:</span> Juggling loads of projects? No dramas! Redmine can handle it all. It's like having ten pairs of hands!</li>
</ul>
<p>(和訳: 7ページ目:王室御用達レベルの機能!(しかも自分で追加できる!))</p>
<p>これは、ちゃちなソフトじゃないぜ、相棒。Redmineには、アゴが外れるほどすごい機能が満載だ:</p>
<ul>
<li><span class="bold">課題追跡:</span> まるで獲物を追うブラッドハウンドのように、バグを見つけて潰すのが、「コロネーションチキン」って言うより早い。</li>
<li><span class="bold">ガントチャート:</span> プロジェクトのタイムラインが、サッカー場みたいに表示される。いつ決勝ゴールを決めるか(つまり、プロジェクトを終わらせるか!)が正確に分かる!</li>
<li><span class="bold">Wiki:</span> チーム共有の頭脳。会議のメモから、ミルドレッドおばさんの有名なフラップジャックのレシピまで、重要な情報を全部ここにぶち込んでおけ。</li>
<li><span class="bold">フォーラム:</span> チームとチャットしたり、アイデアを議論したり、とにかく楽しくおしゃべりできる。</li>
<li><span class="bold">時間管理:</span> 貴重な時間がどこに使われているかを確認できる。もうサボれないぞ!</li>
<li><span class="bold">カスタムフィールド:</span> Redmineを自分好みにカスタマイズ!「好きなビスケット」とか「好きなスパイスガール」とか、必要な情報を何でも追加できる。<span class="bold">それでも足りなきゃ、牛が帰ってくるまで、もっともっとカスタムフィールドを追加できるぞ!</span></li>
<li><span class="bold">複数プロジェクト対応:</span> たくさんのプロジェクトを抱えてる? 問題ない!Redmineなら全部管理できる。まるで10個の手があるみたいだ!</li>
</ul>
<h2>PAGE 9: IT'S A KNOCKOUT! (CONCLUSION)</h2>
<p>So there you have it. Redmine: it's free, it's powerful, and it'll make your projects run smoother than a pint of Guinness. Get on it, and you'll be laughing all the way to the bank (or at least to the pub for a celebratory pint!). You'd be a right numpty not to!</p>
<p>(和訳: 9ページ目:こいつはすごい!(結論))</p>
<p>これで全部だ。Redmine:無料、パワフル、そしてプロジェクトをギネスビールよりもスムーズに進めてくれる。早速使ってみて、笑いが止まらなくなるはずだ(少なくとも、お祝いのビールを飲みにパブに行くまでは!)。使わないなんて、大バカ者だぜ!</p>
<br>
<a href="/">トップページへ戻る</a>
</div>
</body>
</html>
英国英語の俗語モリモリ、参考元がタブロイド紙ということもあり、読者への煽りも満載の露悪的なものにしています。こうして得た404ページを404.html
としてサーバ上に作成します。
サイトへの配置
- Redmineの404.html格納ディレクトリへの移動
cd /path/to/redmine/root/directory/public
自分の環境に合わせます。/var/lib/html/redmine/public
等
- 既存404.htmlの退避
sudo mv 404.html /hoge/404.html.$(date +%Y%m%d)
任意の退避先を指定します。
- ファイル差し替え
上記の404.htmlを任意の方法でこのディレクトリに配置します。
sudo chown www-data:www-data 404.html
として、アクセス権をapache2実行ユーザ(デフォルトではwww-data
)に変えておきます。
必要に応じてWebサービス再起動、動作確認
動的な部分を一切いじらないため、Webサービスの再起動は不要ですが、念のため
sudo systemctl restart apache2.service && echo $?
→ 0
を確認
として、Webサービスの再起動を行います。
設定後、サイトURLに存在しない文字列を適当に入れて、上記の404エラーが出れば設定完了です。

より明確化したいのであれば、アクセスログやエラーログを確認して404がでていることを確認しましょう。
コメントを残す