<?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>FelineWave &#187; Apache</title>
	<atom:link href="http://www.felinewave.com/wordpress/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.felinewave.com/wordpress</link>
	<description>Tous les geeks sont egaux devant la prise peritel cachée derriere la tv</description>
	<lastBuildDate>Sun, 25 Dec 2011 21:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Demander à Apache de lister les répertoires sur les NAS Synology</title>
		<link>http://www.felinewave.com/wordpress/2009/08/29/demander-a-apache-de-lister-les-repertoires-sur-les-nas-synology/</link>
		<comments>http://www.felinewave.com/wordpress/2009/08/29/demander-a-apache-de-lister-les-repertoires-sur-les-nas-synology/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 14:08:03 +0000</pubDate>
		<dc:creator>Romain</dc:creator>
				<category><![CDATA[Technologie]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[Synology]]></category>

		<guid isPermaLink="false">http://www.felinewave.com/wordpress/?p=566</guid>
		<description><![CDATA[Par défaut, la configuration Apache des NAS Synology ne permet pas d&#8217;afficher automatiquement le contenu des répertoires WEB (pour la fonctionnalité Web Station). Du coup, quand un visiteur veut voir le contenu d&#8217;un répertoire qui ne possède pas de fichier index, il est redirigé vers une page d&#8217;erreur : Voici comment modifier ce comportement pour [...]]]></description>
			<content:encoded><![CDATA[<p>Par défaut, la configuration Apache des NAS Synology ne permet pas d&#8217;afficher automatiquement le contenu des répertoires WEB (pour la fonctionnalité <em>Web Station</em>). Du coup, quand un visiteur veut voir le contenu d&#8217;un répertoire qui ne possède pas de fichier index, il est redirigé vers une page d&#8217;erreur :</p>
<div id="attachment_569" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.felinewave.com/wordpress/wp-content/uploads/2009/08/synology_erreur1.jpg"><img class="size-large wp-image-569" title="synology_erreur" src="http://www.felinewave.com/wordpress/wp-content/uploads/2009/08/synology_erreur1-550x234.jpg" alt="Page d'erreur 403 Synology" width="550" height="234" /></a><p class="wp-caption-text">Page d&#39;erreur 403 Synology</p></div>
<p>Voici comment modifier ce comportement pour afficher la liste des éléments du répertoire :</p>
<ol>
<li>Pour commencer, il faut activer le service telnet ou SSH dans la partie management du NAS (Services réseau \ Terminal). Sur mac, j&#8217;ai directement accès au SSH via le terminal. Sur XP, ce n&#8217;est pas le cas et il faudra utiliser telnet.</li>
<li>Téléchargez sur Internet un <a href="http://www.google.fr/#hl=fr&amp;q=apache+icons" onclick="pageTracker._trackPageview('/outgoing/www.google.fr/_hl=fr_amp_q=apache+icons?referer=');">jeux d&#8217;icônes pour Apache</a> à décompresser et sauver sur le répertoire <em>public</em> du NAS.</li>
<li>Connectez-vous au NAS en telnet ou ssh via un terminal. Utilisateur <em>root</em> et le mot de passe de l&#8217;admin.</li>
<li>On copie les icônes Apache :</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>volume1<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>icons<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>syno<span style="color: #000000; font-weight: bold;">/</span>apache<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<li>On rapatrie le fichier de configuration d&#8217;Apache pour pouvoir le modifier facilement via un éditeur de texte :</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>syno<span style="color: #000000; font-weight: bold;">/</span>apache<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf-user <span style="color: #000000; font-weight: bold;">/</span>volume1<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<li>On modifie le fichier httpd.conf-user disponible dans le répertoire <em>public</em> comme ceci :</li>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>Directory <span style="color: #0000ff;">&quot;/var/services/web&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;"># Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
</span><span style="color: #666666; font-style: italic;"># or any combination of:
</span><span style="color: #666666; font-style: italic;">#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
</span><span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;"># Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
</span><span style="color: #666666; font-style: italic;"># doesn't give it to you.
</span><span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;"># The Options directive is both complicated and important.  Please see
</span><span style="color: #666666; font-style: italic;"># http://httpd.apache.org/docs/2.2/mod/core.html#options
</span><span style="color: #666666; font-style: italic;"># for more information.
</span><span style="color: #666666; font-style: italic;">#
</span>Options Indexes MultiViews
&nbsp;
<span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;"># AllowOverride controls what directives may be placed in .htaccess files.
</span><span style="color: #666666; font-style: italic;"># It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
</span><span style="color: #666666; font-style: italic;">#   Options FileInfo AuthConfig Limit
</span><span style="color: #666666; font-style: italic;">#
</span>AllowOverride All
&nbsp;
<span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;"># Controls who can get stuff from this server.
</span><span style="color: #666666; font-style: italic;">#
</span><span style="color: #666666; font-style: italic;">#Order allow,deny
</span><span style="color: #666666; font-style: italic;">#Allow from all
</span>
<span style="color: #339933;">&lt;/</span>Directory<span style="color: #339933;">&gt;</span></pre></div></div>

<li>Après avoir cette modification, on replace le fichier de config à sa place :</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>volume1<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>httpd.conf-user <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>syno<span style="color: #000000; font-weight: bold;">/</span>apache<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<li>On redémarre le NAS pour prendre en compte les modifications. Et ça marche :</li>
</ol>
<div id="attachment_572" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.felinewave.com/wordpress/wp-content/uploads/2009/08/Liste_index.jpg"><img class="size-large wp-image-572" title="Liste_index" src="http://www.felinewave.com/wordpress/wp-content/uploads/2009/08/Liste_index-550x193.jpg" alt="Après modification, Apache nous donne la liste du contenu des répertoires !" width="550" height="193" /></a><p class="wp-caption-text">Après modification, Apache nous donne la liste du contenu des répertoires !</p></div>
<p>Au final, on y arrive. Cependant, je trouve dommage que Synology n&#8217;ait pas activé cette fonction par défaut. C&#8217;est sûr que d&#8217;un point de vue sécurité, il est plus prudent de cacher le contenu des répertoires. Pourtant la norme aujourd&#8217;hui chez les hébergeurs est plutôt à l&#8217;accès au listing du répertoire. L&#8217;utilisateur peut toujours (très facilement) créer un fichier index ou bien créer un fichier .htaccess pour limiter les visiteurs curieux. Cette manipulation reste incomparablement plus facile que la modification du httpd.conf que nous venons de faire.</p>
<p>Ou alors, il faudrait que monsieur Synology ajoute une petite case à cocher dans son IHM de gestion pour donner à l&#8217;admin la fonction de listing en un clin d&#8217;oeil.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.felinewave.com/wordpress/2009/08/29/demander-a-apache-de-lister-les-repertoires-sur-les-nas-synology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

