Cloud Nine

Avatar

This blog is my everything!!

Aug
13
VirtualHostの設定方法
Aug 13, 2008 0

VirtualHostの設定方法を紹介します。
VirtualHostを設定すると、複数のドメインを一台サーバで運営することができます。

httpd.conf の設定

Apacheのhttpd.confを変更します。
デフォルトなら、/etc/httpd/conf/httpd.conf あたりにいます。
みつからない時は、

locate httpd.conf

で探してください。

1.ServerNameのコメントアウト

# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName localhost コメントアウトしてください。

2.httpd.conf にVirtualHostの設定を追加します。

<virtualhost *:80>
    DocumentRoot /home/text/www/ ドメインのRoot
    ServerName www.test.com 指定したいドメイン
</virtualhost>

3.apacheの再起動

Apacheの再起動方法はいろいろあります。

 /etc/rc.d/init.d/httpd restart
/usr/sbin/apachectl restart

上記の3つすれば、とりあずVirtualHostの設定は完了です。

Aug
02
<textarea>の中の特殊文字
Aug 2, 2008 0

<textarea>の中の特殊文字について気づいたこと

<textarea>

特殊文字の扱いについて

<textarea>
</textarea>
</textarea>

Aug
01
CentOSのyumがうまくできない時
Aug 1, 2008 0

下記のように、yumをやってもうまくいかないときに確認すること

[root@localhost ~]# yum -y install postgresql-server
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError: 
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError: 
Error: Cannot find a valid baseurl for repo: updates

確認すること

以下のコマンドを実行してください。

# nslookup google.com

下記の返答がかえってきたら、ミラーを引きにいけてないので、ネットワークの設定を疑う

;; connection timed out; no servers could be reached

IPアドレスを確認

# ifconfig
eth0      Link encap:Ethernet  HWaddr **:**:**:**:**:**
inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44 errors:0 dropped:0 overruns:0 frame:1
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4045 (3.9 KiB)  TX bytes:14779 (14.4 KiB)
          Interrupt:177

赤文字のaddrのIPを確認

デフォルトゲートウェイを確認

#vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
GETWAT=192.168.0.1

ちゃんとむき先はあっているのか確認

名前解決の設定確認

## vi /etc/resolv.conf
meserver 192.168.0.1

ルータのLAN側のIPアドレスを設定をためす。
上記でつながらない場合は、あなたが契約しているISPのDNSサーバのIPアドレスを設定してください。
ぼくはこれでうまくいくようになりました。

Jul
26
meadow(Emacs)で基本的な文字置換
Jul 26, 2008 0

Emacsで文字置換

M-x replace-string 置換の対象の文字 RET 置換したい文字 RET

‘置換の対象の文字’をすべて’置換したい文字’へ変更できます。

M-x query-replace 置換の対象の文字 RET 置換したい文字 RET

ユーザーが指定したもののみ ‘置換の対象の文字’をすべて’置換したい文字’へ変更できます。
SPACEで置換、nでパスできます。

Jul
23
meadow(Emacs)のCSS css-mode.elのメモ
Jul 23, 2008 0

css-mode.el

Ctl+C + Ctl+U = url()を挿入
Ctl+C + Ctl+C = /* */を挿入
M+tab キーで CSS の属性を入力補完してくれる。

Jul
10
IE6をCSSで中央配置にする際のメモ
Jul 10, 2008 0

IE6をCSSで中央配置する際に、よく忘れるのでメモしておきます。

IE6には過去のIEの互換性のため、DOCTYPEの有無により、標準準拠モードと互換モードを切り替えるようです
(DOCTYPEスイッチだって)
で、互換モードだとtext-align:centerとか指定しないと中央配置されない。
HTML 4.01の標準モードだと、互換モードになるので、ちゃんと、htmlの一番上に宣言を明確に書くといいらしい。

参考として、

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

メモ
IE5(Win), IE5.5(Win), IE5.2(Mac)、ネスケ4もmargin:autoが未サポートだって。

Jul
08
画面遷移についてのメモ
Jul 8, 2008 0

プログラムを外注や、他人にお願いする際ですが、画面遷移を作るように心がけています。
その際によく忘れることがあるので、メモしておきます。

input typeのbuttonの設定です。

<input type="button" value=" 確認画面へいく " onClick="location.href='次の画面のURL'">

上記の設定で、ボタンにリンクを指定することができます。

Jul
05
htmlspecialcharsの逆の処理
Jul 5, 2008 0

$html = "<img src='/media/20080705.gif' />";
$html1 = htmlspecialchars($html);
$html2 =htmlspecialchars_decode($html1);
echo $html1;
表示結果:<img src='/media/20080705.gif' />
echo $html2;

Jul
03
I will go to OPEN SOURCE CONFERENCE 2008 Kansai
Jul 3, 2008 0

I will go to OPEN SOURCE CONFERENCE 2008 Kansai.
I will attend these classes.

First day:2008/07/18

10:15-11:00 Linux+Xenによるサーバ仮想化構築事例のご紹介
11:15-12:00 マイクロソフトのサーバーの仮想化、そして統合管理
13:00-13:45 オープンソースでシステム監視!統合監視ソフトウェア ZABBIX
14:00-14:45 業務システムへのOSS導入事例紹介と、OSSの企業情報ポータルLiferayのご紹介 Maybe…
15:15-16:00 [すぐに役立つMySQL Tipsシリーズ] MySQLで大量データを投入するには?
16:15-17:00 Linux crash dump 読み方入門

Second day:2008/07/19

10:15-11:00 Shibuya.js in Kyoto(2コマ連続)
11:15-12:00 いまさら聞けない! Samba によるファイルサーバ 構築入門
13:00-13:45 Linkstation / 玄箱をハックしよう
14:00-14:45 Ubuntu 45 分間クッキング Maybe…
15:15-16:00 2008年7月度 LILO Monthly Seminar

Jul
02
My firefox plugin.
Jul 2, 2008 0

This is my firefox plugin.

Firefox

Firebug
If you make web site and web system,you should use it.
It is so useful.
FireDictionary
Its dictonary. I use English to Japan.
FireGesutures
タブブラウザといえばマウスジェスチャーがなければ始まらない。むしろ必須と言える。
Gmail Manager
It can manage to use Gmail.
Greasemonkey
Allows you to customize the way a webpage displays using small bits of JavaScript.
IE Tab
Please wait…
LDR Counter
Please wait…
LinkChecker
Please wait…
Make link
Please wait…
PDF Download
Please wait…
SBMカウンタ
Screen grab!
Please wait…
Speed Dial
Please wait…
TeitterFox
ViewSouceWith
Please wait…
WebDeveloper
Please wait…
Yslow
Please wait…

Advertisings

Search Keyword

Calendar

2008年 August
« Jul    
 123
45678910
11121314151617
18192021222324
25262728293031

Status

フィードメーター - Cloud  Nine なかのひと あわせて読みたいブログパーツ