Home > etc
etc Archive
ubuntu…
- 2008-02-21 (木)
- etc
fedora で遊んでて、たまにぐぐるとubnutu関連多いですな。選択間違えた?
っ~ことで、暇できたら ubuntu へ乗り換えキャンペーン!!
by.尻軽です…nnpooh.
年末だというのに。。。
- 2007-12-22 (土)
- etc
あーーーー。もうPCさわりたくない…
年末だというのに。。。クリスマス近いのに。。。
もうみんな仕事やめようよ~~。慌てなくても来年早々するから~~。
...愚痴でした。 明日もがんばります。。ぅぅぅ…
.htaccess で外部からの直リンク禁止
- 2007-11-13 (火)
- etc
禁止したいフォルダの.htaccess ファイルに以下の内容を記述すれば、([例]domain.tld)以外からのアクセスが拒否される。
SetEnvIf Referer “^http([s]?)://([a-z\.]*)domain\.tld” welcome
order deny,allow
deny from all
allow from env=welcome
最終行を改行して終了。
phpMyAdmin の設定
- 2007-11-11 (日)
- etc
# yum list | grep phpMyAdmin ← 確認
# yum -y install phpMyAdmin ← インストール
# vi /etc/phpMyAdmin/config.inc.php
$cfg[’blowfish_secret’] = ‘xxxxxx’; ← 適当に追加
$cfg[’Servers’][$i][’auth_type’] = ‘cookie’; ← cookie に変更
$cfg[’Servers’][$i][’user’] = ‘root’; ← ユーザー名を記述
$cfg[’Servers’][$i][’password’] = ‘xxxxxx’; ← パスワードを記述
# vi /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/>
…
allow from 192.168.1 ← 追加
</Directory>
# /etc/rc.d/init.d/httpd restart
ブラウザで http://192.168.1.22/phpMyAdmin/ へアクセス。
完了。
ウェブサーバーの設定
- 2007-11-10 (土)
- etc
# vi /etc/httpd/conf/httpd.conf
ServerTokens Prod ← 変更
ServerAdmin webadmin@local.domain.tld ← 変更
ServerName domain.tld:80 ← 変更
UseCanonicalName On ← 変更 ( 末尾 “/” の自動補完 )
<Directory “/var/www/html”>
Options Includes ExecCGI FollowSymLinks ← CGI,SSI許可に変更
AllowOverride All ← .htaccessの許可に変更
</Directory>
ServerSignature Off ← 変更
LanguagePriority ja… ← ja を先頭にする。
#AddDefaultCharset UTF-8 ← コメントアウト
AddHandler cgi-script .cgi .pl ← 変更
# ln -s /usr/bin/perl /usr/local/bin/perl ← Perlのシンボリックリンク
# whereis perl ← 確認
# chown xxxxxx. /var/www/ ← 所有者を変更
# ll /var/ ← 所有者を確認
# /etc/rc.d/init.d/httpd start← httpd スタート
# /sbin/chkconfig httpd on ← 自動起動オン
# /sbin/chkconfig –list httpd ← 確認
# rm -f /etc/httpd/conf.d/welcome.conf ← welcomeページを削除
# rm -f /var/www/error/noindex.html ← noindexページを削除
# exit
$ vi /var/www/html/index.html ← テストページを作成してブラウザで確認
$ rm -f /var/www/html/index.html ← テストページを削除
Home > etc
- Links
- Search
- Feeds