{"id":40,"date":"2008-08-26T09:24:11","date_gmt":"2008-08-26T07:24:11","guid":{"rendered":"http:\/\/wp1.fredptitgars.net\/index.php\/2008\/08\/26\/installation-dapache\/"},"modified":"2008-08-26T09:24:11","modified_gmt":"2008-08-26T07:24:11","slug":"installation-dapache","status":"publish","type":"post","link":"https:\/\/fredptitgars.ovh\/?p=40","title":{"rendered":"installation d&rsquo;apache"},"content":{"rendered":"<p>apache est un serveur web:<\/p>\n<p>on install:<\/p>\n<p><code><br \/>\napt-get install apache2 libapache2-mod-php5 apache2-mpm-itk<br \/>\n<\/code><\/p>\n<p>Dans le fichier de conf \/etc\/apache2\/apache.conf<br \/>\n&#8211; on ajoute:<br \/>\n<br \/>ServerName fredptigars.homelinux.org<\/p>\n<p>&#8211; On modifie<br \/>\nServerTokens Prod<\/p>\n<p>Pour les hosts virtuel, on modifie le fichier \/etc\/apache2\/sites-available comme ce ci:<\/p>\n<p><code><\/p>\n<p>NameVirtualHost *<br \/>\n<VirtualHost *><br \/>\n        ServerAdmin webmaster@localhost<\/p>\n<p>        DocumentRoot \/home\/web\/<br \/>\n        <Directory \/><br \/>\n                Order Deny,Allow<br \/>\n                Deny from all<br \/>\n                Options None<br \/>\n                AllowOverride None<br \/>\n        <\/Directory><br \/>\n        <Directory \/home\/web\/><br \/>\n                Options FollowSymLinks<br \/>\n                Order Allow,Deny<br \/>\n                Allow from all<br \/>\n        <\/Directory><br \/>\n        Alias \/private \/var\/www<br \/>\n        <Directory \/var\/www\/><br \/>\n                Options Indexes FollowSymLinks MultiViews<br \/>\n                AllowOverride All<br \/>\n                Order Deny,Allow<br \/>\n                Deny from all<br \/>\n                allow from localhost<br \/>\n                Allow from 192.168.0.0\/24<br \/>\n                ErrorDocument 403 \"http:\/\/fredptitgars.net\"<br \/>\n        <\/Directory><\/p>\n<p>        ScriptAlias \/cgi-bin\/ \/usr\/lib\/cgi-bin\/<br \/>\n        <Directory \"\/usr\/lib\/cgi-bin\"><br \/>\n                AllowOverride None<br \/>\n                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br \/>\n                Order allow,deny<br \/>\n                Allow from all<br \/>\n        <\/Directory><\/p>\n<p>        ErrorLog \/var\/log\/apache2\/error.log<\/p>\n<p>        # Possible values include: debug, info, notice, warn, error, crit,<br \/>\n        # alert, emerg.<br \/>\n        LogLevel warn<\/p>\n<p>        CustomLog \/var\/log\/apache2\/access.log combined<br \/>\n        ServerSignature On<\/p>\n<p>    Alias \/doc\/ \"\/usr\/share\/doc\/\"<br \/>\n    <Directory \"\/usr\/share\/doc\/\"><br \/>\n        Options Indexes MultiViews FollowSymLinks<br \/>\n        AllowOverride None<br \/>\n        Order deny,allow<br \/>\n        Deny from all<br \/>\n        Allow from 127.0.0.0\/255.0.0.0 ::1\/128<br \/>\n    <\/Directory><br \/>\n  #Empecher le telechargement de fichiers .htaccess<br \/>\n   AccessFileName .httpdoverride<br \/>\n   <Files &nbsp; \"^\\.ht\"><br \/>\n       Order allow,deny<br \/>\n       Deny from all<br \/>\n       Satisfy All<br \/>\n   <\/Files><\/p>\n<p><\/VirtualHost><\/p>\n<p><\/code><\/p>\n<p>cela nous cr\u00e9\u00e9 2 h\u00f4tes virtuels:<br \/>\n&#8211; \/ => accessible de tous, la racine du site qui pointe sur \/home\/web<br \/>\n&#8211; \/var\/www => accessible uniquement du r\u00e9seaux local qui pointe sur \/var\/www<\/p>\n<h2>Les modules<\/h2>\n<p>Les modules pret sont dans le r\u00e9pertoire : <em>\/etc\/apache2\/mods-available<\/em><\/p>\n<p>pour activer un module il suvit de rentrer la commde (en root):<br \/>\n<code><br \/>\na2enmod <nom du module><br \/>\n<\/code><br \/>\nIl ne reste plus qu&rsquo;a recharger apache:<br \/>\n<code><br \/>\n\/etc\/init.d\/apache2 reload<br \/>\n<\/code><\/p>\n<p>pour d\u00e9sactiver un module, tout simplement<\/p>\n<p><code><br \/>\na2dismod <nom du module><br \/>\n<\/code><\/p>\n<p><em>Man est ton ami&#8230;<\/em><\/p>\n<hr \/>\n<p>Les sources:<br \/>\n<br \/><a href=\"http:\/\/doc.ubuntu-fr.org\/apache2\">http:\/\/doc.ubuntu-fr.org\/apache2<\/a><br \/>\n<br \/><a href=\"http:\/\/doc.ubuntu-fr.org\/tutoriel\/securiser_apache2\">http:\/\/doc.ubuntu-fr.org\/tutoriel\/securiser_apache2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>apache est un serveur web: on install: apt-get install apache2 libapache2-mod-php5 apache2-mpm-itk Dans le fichier de conf \/etc\/apache2\/apache.conf &#8211; on ajoute: ServerName fredptigars.homelinux.org &#8211; On modifie ServerTokens Prod Pour les hosts virtuel, on modifie le fichier \/etc\/apache2\/sites-available comme ce ci: NameVirtualHost * ServerAdmin webmaster@localhost DocumentRoot \/home\/web\/ Order Deny,Allow Deny from all Options None AllowOverride None [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-poweredge-t105"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40"}],"version-history":[{"count":0,"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fredptitgars.ovh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}