Apache
httpd.confの以下の行を変更 ;; 実際は1行です LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined ;; %Dを追記 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combinedこれで、/var/log/…
まず、以下のコマンドを実行 $ sudo a2enmod rewrite次に、/etc/apache2/sites-available/defaultの <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None -> Allに変更 Order allow,deny allow from all </Directory>これでOK。最後にApacheを再起動。 $ sud…
Perlのパスも問題ない。 文法やtypoも問題ない。 なのに、http://example.com/~user/test.cgiにアクセスすると、無情の「500 Internal Server Error」・・・。 DocRootの/var/www/html下では問題なく動くので、httpd.confの設定でも無さそう。 原因はコイツ # a…
httpd.confに ;; コメントアウト UserDir disable →#UserDir disable ;; 追記 UserDir public_htmlとしてApacheを再起動。適当にindex.htmlファイルとかを作って、http://example.com/~user/にアクセスすると403が返ってくる。 原因はコイツ # ls -l /home d…
;; 書式に気をつけないとInternal Server Errorが待ってる Order deny,allow Deny from allこれをアクセスされたくないディレクトリ直下に置けば、HTTP経由ではアクセス不可になる。 文脈は覚えても、細かい書式をすぐ忘れるのでメモ。 HTTPプロトコルを理解…
$ /usr/sbin/httpd -Vこれで確認可能。PHPはphpinfo()すれば良い。 MySQLは… どうやるのかな〜(・x・ ).o0○
string gethostbyaddr(string $ip_address) 引数にIPアドレスを指定すれば、PHPが逆引きしてくれる。 Apacheのhttpd.confでHostnameLookupsがon(デフォルトはoff)になってたらもっとカンタン。 echo $_SERVER['REMOTE_HOST'];これでホスト名が表示される。 …
apacheの設定ファイルhttpd.confをチェック AllowOverride None ↓ AllowOverride Allに変更してapacheを再起動。 mod_rewriteが効かなくてちょっと焦った(*ノノ)