<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yukun&#039;s Blog &#187; Server</title>
	<atom:link href="http://www.yukun.info/blog/tag/server/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yukun.info</link>
	<description>難しいことは分かりやすく、簡単なことは面白く紹介</description>
	<lastBuildDate>Thu, 26 Jan 2012 03:33:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Apacheでよく使うコマンドと設定項目</title>
		<link>http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html</link>
		<comments>http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html#comments</comments>
		<pubDate>Thu, 25 Dec 2008 13:50:51 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Setting]]></category>

		<guid isPermaLink="false">http://www.yukun.info/?p=1275</guid>
		<description><![CDATA[設置環境はFedoraを想定しています。 注：ソースからインストールした場合や他の環境だと一部ファイルのパスが違うところがあります。 今後も少しずつ書き足し・修正していきます。 コマンド 起動 # /etc/rc.d/i &#8230; <a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html">Apacheでよく使うコマンドと設定項目</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>設置環境はFedoraを想定しています。<br />
注：ソースからインストールした場合や他の環境だと一部ファイルのパスが違うところがあります。<br />
今後も少しずつ書き足し・修正していきます。</p>
<h2>コマンド</h2>
<dl>
<dt>起動</dt>
<dd># /etc/rc.d/init.d/httpd start<br />
または、<br />
# service httpd start</dd>
<dt>終了</dt>
<dd># /etc/rc.d/init.d/httpd stop<br />
または、<br />
# service httpd stop</dd>
<dt>再起動</dt>
<dd># /etc/rc.d/init.d/httpd restart<br />
または、<br />
# service httpd restart</dd>
<dt>自動起動に設定</dt>
<dd># chkconfig httpd on</dd>
<dt>自動起動の確認(Run level 3:on)</dt>
<dd># chkconfig &#8211;list httpd</dd>
<dt>設定の反映</dt>
<dd># /etc/rc.d/init.d/httpd reload</dd>
<dt>ディレクトリの所有者の変更</dt>
<dd># chown ＜ユーザ名＞. /var/www/html/</dd>
<dt>ディレクトリをApache実行ユーザに変更</dt>
<dd># chown -R apache:apache /var/www/html/cgi-bin/</dd>
</dl>
<h2>httpd.confの設定</h2>
<dl>
<dt>設定ファイルhttpd.confのパス</dt>
<dd>/etc/httpd/conf/httpd.conf</dd>
<dt>外部設定ファイル*.confを置くパス</dt>
<dd>/etc/httpd/conf.d/*.conf<br />
・起動時に読み込まれる<br />
・AliasとDirectoryを合わせて用いる場合が多い
</dd>
<dt>DocumentRoot</dt>
<dd>ルートディレクトリの設定<br />
 e.g. DocumentRoot &#8220;/var/www/html&#8221; で<br />
www.example.com/へのアクセスは/var/www/htmlのインデックスページとなる。</dd>
<dt>Alias</dt>
<dd>Alias ＜ドメイン以下のURLパス＞ ＜サーバ内のディレクトリパス＞<br />
<em>e.g.</em> Alias /blog /var/www/blog<br />
の場合は、http://www.example.com/blog/にアクセスした際、サーバの/var/www/blog/内の既定のインデックスファイルが読み込まれる。</dd>
<dt>Directoryタグ</dt>
<p>e.g.</p>
<pre>&lt;directory &quot;/var/www/html&quot;&gt;〜&lt;directory&gt;</pre>
<p>属性にディレクトリパスを指定している。</p>
<dl>
<dt>.htaccessを許可する場合</dt>
<dd>AllowOverride All</dd>
<dt>IPアドレスによるアクセス制限</dt>
<dd>
<pre>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.1.0/24
</pre>
<p>↑はlocalhost、イントラネット以外からのアクセスを拒否
</dd>
</dl>
</dl>
<h2>.htaccessによるパスワード認証</h2>
<h3>.htaccessファイル内の設定例</h3>
<pre>
SSLRequireSSL # SSL経由のアクセス
AuthUserFile ＜認証するユーザリストのパス＞
AuthGroupFile ＜パス＞
AuthName "＜ページ名＞"
AuthType Basic # 認証タイプ
require valid-user
</pre>
<h3>認証するユーザの登録</h3>
<p>初回は<br />
# htpasswd -b -c ＜保存先＞ ＜ユーザ名＞ ＜パスワード＞<br />
二件目以降は既にファイルが作成されているので-cを抜く<br />
# htpasswd -b ＜保存先＞ ＜ユーザ名＞ ＜パスワード＞<br />
ここで作成したファイルのパスを上のAuthUserFile項目に書く。<br />
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/06/linux-users.html" rel="bookmark" title="2008年6月26日">ユーザー管理に関するLinuxコマンド</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/sshd-log-file.html" rel="bookmark" title="2008年6月24日">sshdのログファイルの確認方法</a></li>
<li><a href="http://www.yukun.info/blog/2008/09/r-set-work-directory.html" rel="bookmark" title="2008年9月3日">Rで統計: 作業ディレクトリの設定と確認 &#8211; setwd()、getwd()関数</a></li>
<li><a href="http://www.yukun.info/blog/2011/08/wordpress-file-access.html" rel="bookmark" title="2011年8月9日">WordPress: 解決策→「要求されたアクションを実行するには、WordPress が Web サーバーにアクセスする必要があります。」</a></li>
<li><a href="http://www.yukun.info/blog/2011/12/linux-redmine-subversion-install.html" rel="bookmark" title="2011年12月6日">Linux: RedmineとSubversionのインストール・設定例</a></li>
</ul>
<p><!-- Similar Posts took 13.863 ms --></p>
<p><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html">Apacheでよく使うコマンドと設定項目</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>sshdのログファイルの確認方法</title>
		<link>http://www.yukun.info/blog/2008/06/sshd-log-file.html</link>
		<comments>http://www.yukun.info/blog/2008/06/sshd-log-file.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 15:00:00 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://www.yukun.info/trump/19700101/sshd%e3%81%ae%e3%83%ad%e3%82%b0%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e7%a2%ba%e8%aa%8d%e6%96%b9%e6%b3%95</guid>
		<description><![CDATA[サーバで sshd サービスを使っていると、招かれざる人(大抵bot)も結構な頻度でアクセスしてきます。何時何処からどのようなアクセスがあるのかは知っておく為にログファイルをモニタリング。 sshd のログファイルのパス &#8230; <a href="http://www.yukun.info/blog/2008/06/sshd-log-file.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2008/06/sshd-log-file.html">sshdのログファイルの確認方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>サーバで sshd サービスを使っていると、招かれざる人(大抵bot)も結構な頻度でアクセスしてきます。何時何処からどのようなアクセスがあるのかは知っておく為にログファイルをモニタリング。</p>
<p>sshd のログファイルのパスは Fedora では通常 /var/log/secure です。</p>
<pre>
# cat /var/log/secure
</pre>
<p>ちなみに、ssh のログインに失敗/成功したユーザ数は以下の様なコマンド等でカウントできます。</p>
<pre>
# grep -c invalid /var/log/secure
# grep -c Failed /var/log/secure
# grep -c Accepted /var/log/secure
</pre>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html" rel="bookmark" title="2008年12月25日">Apacheでよく使うコマンドと設定項目</a></li>
<li><a href="http://www.yukun.info/blog/2008/01/euc-to-utf8.html" rel="bookmark" title="2008年1月12日">Linuxコマンドで複数ファイルの文字コードを一括変換</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/linux-users.html" rel="bookmark" title="2008年6月26日">ユーザー管理に関するLinuxコマンド</a></li>
<li><a href="http://www.yukun.info/blog/2011/04/openssh-server.html" rel="bookmark" title="2011年4月27日">OpenSSH サーバのインストールと公開鍵・秘密鍵の作成・設置</a></li>
<li><a href="http://www.yukun.info/blog/2008/01/shell-script-kill-process-2.html" rel="bookmark" title="2008年1月10日">プロセスの監視＆自動復旧(簡易版)</a></li>
</ul>
<p><!-- Similar Posts took 11.171 ms --></p>
<p><a href="http://www.yukun.info/blog/2008/06/sshd-log-file.html">sshdのログファイルの確認方法</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/06/sshd-log-file.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cygwinでcronをインストール</title>
		<link>http://www.yukun.info/blog/2008/01/cygwin-cron.html</link>
		<comments>http://www.yukun.info/blog/2008/01/cygwin-cron.html#comments</comments>
		<pubDate>Mon, 07 Jan 2008 15:00:00 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Setting]]></category>

		<guid isPermaLink="false">http://www.yukun.info/trump/19700101/cygwin%e3%81%a7cron%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab</guid>
		<description><![CDATA[Linux系OSに入っているタスクを自動実行するためのデーモンプロセス、cronをWindows環境でも使用するため,Cygwin((UNIXのフリーソフトウェア等をWindowsに移植したもの))を用いてcronをイン &#8230; <a href="http://www.yukun.info/blog/2008/01/cygwin-cron.html">Continue reading <span class="meta-nav">&#8594;</span></a><p><a href="http://www.yukun.info/blog/2008/01/cygwin-cron.html">Cygwinでcronをインストール</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Linux系OSに入っているタスクを自動実行するためのデーモンプロセス、cronをWindows環境でも使用するため,Cygwin((UNIXのフリーソフトウェア等をWindowsに移植したもの))を用いてcronをインストール。</p>
<p>まず、<a href="http://cygwin.com/">Cygwin Information and Installation</a>からCygwinをダウンロードしセットアップを開始。セットアップを進めていくと下の画面でインストールするパッケージを選択できます。ここでAdmin内のcronとcygrunsrvをInstallすればOK。</p>
<p><a href="http://www.yukun.info/wp-content/uploads/cygwinInstallCron.png"><img src="http://www.yukun.info/wp-content/uploads/cygwinInstallCron.png" alt="Cygwinのインストール画面:パッケージ選択" title="cygwinInstallCron" width="400" height="211" class="alignnone size-full wp-image-1941" /></a></p>
<p>インストール後、サービスの設定には主に以下のサイトを参考にしました。</p>
<ul>
<li><a href="http://sonic64.com/2004-06-23.html">cygwin で cron を使う</a></li>
<li><a href="http://www.amy.hi-ho.ne.jp/tachibana/cygwin/cron.html">Are You Cygwin Tonight? &#8211; cron</a></li>
</ul>
<h4>関連すると思われる記事：</h4>
<ul class="similar-posts">
<li><a href="http://www.yukun.info/blog/2008/09/fedora-yum-install-gnome.html" rel="bookmark" title="2008年9月15日">FedoraにGUI環境GNOMEをyumでインストール</a></li>
<li><a href="http://www.yukun.info/blog/2008/12/how-to-write-apache-conf.html" rel="bookmark" title="2008年12月25日">Apacheでよく使うコマンドと設定項目</a></li>
<li><a href="http://www.yukun.info/blog/2008/06/install-lxml.html" rel="bookmark" title="2008年6月13日">Python: lxmlのインストール方法</a></li>
<li><a href="http://www.yukun.info/blog/2010/03/java-install-sen-windows.html" rel="bookmark" title="2010年3月25日">Java: 形態素解析Senをインストール(Windows編)</a></li>
<li><a href="http://www.yukun.info/blog/2010/04/setup-eclipse-64bit-android.html" rel="bookmark" title="2010年4月25日">Windows7 64bitにEclipseでAndroid開発環境をセットアップ</a></li>
</ul>
<p><!-- Similar Posts took 9.511 ms --></p>
<p><a href="http://www.yukun.info/blog/2008/01/cygwin-cron.html">Cygwinでcronをインストール</a> is a post from: <a href="http://www.yukun.info">Yukun&#039;s Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/01/cygwin-cron.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

