<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://tm.root-n.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>Tipsというかメモ server:apache:etc</title>
        <description></description>
        <link>https://tm.root-n.com/</link>
        <lastBuildDate>Tue, 18 Nov 2025 18:16:37 +0900</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>https://tm.root-n.com/lib/images/favicon.ico</url>
            <title>Tipsというかメモ</title>
            <link>https://tm.root-n.com/</link>
        </image>
        <item>
            <title>apache :: ブラウザにcache(キャッシュ)させない</title>
            <link>https://tm.root-n.com/server:apache:etc:nocache</link>
            <description>*  html
&lt;meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;&gt;
&lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;no-cache&quot;&gt;
&lt;meta http-equiv=&quot;expires&quot; content=&quot;0&quot;&gt;
とりあえず全部列挙







	*  php
header(&quot;Expires: Wed, 10 Jan 1990 01:01:01 GMT&quot;);
header(&quot;Last-Modified: &quot;. gmdate(&quot;D, d M Y H:i:s&quot;). &quot; GMT&quot;);
header(&quot;Cache-Control: no-store, no-cache, must-revalidate&quot;);
header(&quot;Pragma: no-cache&quot;);

こちらもとりあえず全部列挙



php以外の言語でも header関数 に代替される関数なり、記述で対応可能。…</description>
        <category>server:apache:etc</category>
            <pubDate>Sun, 16 Mar 2008 22:48:24 +0900</pubDate>
        </item>
        <item>
            <title>apache の自動再起動と死活監視</title>
            <link>https://tm.root-n.com/server:apache:etc:restart_and_process_check</link>
            <description>cron による apache(httpd) の再起動と死活監視。

もし httpd プロセスが存在しない場合は、httpd を起動する。





	*  cron ファイル


/etc/cron.d/root.cron






	*  毎朝 5 時に httpd を再起動する


#
# httpd restart
#
0 5 * * * root /etc/init.d/httpd restart</description>
        <category>server:apache:etc</category>
            <pubDate>Fri, 20 Dec 2013 16:58:54 +0900</pubDate>
        </item>
        <item>
            <title>apache :: RewriteでForbidden</title>
            <link>https://tm.root-n.com/server:apache:etc:rewrite_forbidden</link>
            <description>とあるレンタルサーバーにて、Rewrite を使うことに。


	*  いつものように、.htaccess に RewriteEngine on と記述
	*  RewriteCond やら RewriteRule をごにょごにょ書く
	*  早速ブラウザで確認
	*  なぜか、Forbidden (￣□￣;)</description>
        <category>server:apache:etc</category>
            <pubDate>Thu, 16 May 2019 10:25:46 +0900</pubDate>
        </item>
        <item>
            <title>apache :: URL(ディレクトリ名)にハイフンがある時、Rewrite ...</title>
            <link>https://tm.root-n.com/server:apache:etc:rewrite_hyphen</link>
            <description>久々に２時間ほどハマってしまいました。

次のリクエスト(ハイフン入り)を
http://example.com/hoge-fuga

内部的に
http://example.com/hogefuga.php 

↑へ書き換えたい場合。

通常は RewriteRule に以下のように書くと思います。</description>
        <category>server:apache:etc</category>
            <pubDate>Tue, 05 Feb 2013 09:17:17 +0900</pubDate>
        </item>
        <item>
            <title>「Internet Explorer は、クロスサイト ...</title>
            <link>https://tm.root-n.com/server:apache:etc:rewrite_ie_javascript_uri_problem</link>
            <description>たまたま当サイトを IE9 でアクセスすると下記のアラートが出現した。


Internet Explorer は、クロスサイト スクリプトを防止するために、このページを変更しました。


上記のIEが出すアラートは、いろいろ原因があるようだが、どうやら今回は URL に「javascript:」が含まれているのが原因と判明。

回避策として、下記の リライトルール を .htaccess に書いて、とりあえず対策したのでメモしておきます。…</description>
        <category>server:apache:etc</category>
            <pubDate>Fri, 09 Nov 2012 14:24:28 +0900</pubDate>
        </item>
        <item>
            <title>service httpd configtest (reload) した時のエラーの対処法</title>
            <link>https://tm.root-n.com/server:apache:etc:service_httpd_configtest_error</link>
            <description>エラーその１


httpd: apr_sockaddr_info_get() failed for HOGEHOGE


対処方法


% sudo vi /etc/hosts

# 修正前
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

# 修正後
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 HOGEHOGE</description>
        <category>server:apache:etc</category>
            <pubDate>Fri, 13 Sep 2019 19:58:43 +0900</pubDate>
        </item>
        <item>
            <title>ロードバランサにアクセスしてきた実際のIPアドレスのログを出力する</title>
            <link>https://tm.root-n.com/server:apache:etc:x_forwarded_for</link>
            <description>Apache（WEBサーバー）において、通常ではロードバランサ経由でアクセスしてきた端末（PC、スマホなど）のIPアドレスを知ることができません。

アクセスログに残るのは、Apacheにアクセスしてきた直前のIPアドレスであるロードバランサのIPアドレスが記録されるためです。</description>
        <category>server:apache:etc</category>
            <pubDate>Thu, 20 Sep 2018 17:49:58 +0900</pubDate>
        </item>
    </channel>
</rss>
