Formatting code for Apache
====== Apache - HTTP Server Project ======
http://www.apache.org
http://fr.wikipedia.org/wiki/Apache_HTTP_Server
===== Documentation =====
http://httpd.apache.org/docs/
http://www.ac-creteil.fr/reseaux/systemes/linux/lamp/apache2-configuration.html
===== Exemples de configuration =====
##/etc/apache2/sites-enabled/000-default##
%%
DocumentRoot /var/www/vhost/
# Interdit tout le monde dans ce repertoire - Ok
<Directory /var/www/vhost/prive/>
deny from all
</Directory>
# Interdire tous les acces sauf depuis le reseau local
<Directory /var/www/vhost/prive/>
# on interdit par defaut puis on specifie explicitement les autorisations
Order deny,allow
# on autorise le reseau local
Allow from 192.168.0.0/16
# on interdit tout
Deny from all
</Directory>
# Interdire tous les acces sauf utilisateurs valides
<Directory /var/www/vhost/prive/>
Require valid-user
AuthName "Repertoire prive"
AuthType Basic
AuthUserFile /var/www/gpu/stats/.htpasswd
</Directory>
# Rem : creation fichier utilisateurs
# htpasswd -c fichier_passwords utilisateur
%%
===== Commandes utiles =====
==== Debian Etch / Apache 2.2 ====
##/etc/init.d/apache2 restart## arrêter Apache et le relancer
##/etc/init.d/apache2 reload## forcer Apache à relire son fichier de conf
##apache2ctl## configurer Apache
##a2ensite##, ##a2dissite## activer ou désactiver un site apache2 ou un virtual host
##a2enmod##, ##a2dismod## activer ou désactiver un module
===== SSL =====
http://www.debianadmin.com/install-and-configure-apache2-with-php5-and-ssl-support-in-debian-etch.html
voir aussi :
- [[PHP]]
- [[MySQL]]
- [[HTTP]]
http://www.apache.org
http://fr.wikipedia.org/wiki/Apache_HTTP_Server
===== Documentation =====
http://httpd.apache.org/docs/
http://www.ac-creteil.fr/reseaux/systemes/linux/lamp/apache2-configuration.html
===== Exemples de configuration =====
##/etc/apache2/sites-enabled/000-default##
%%
DocumentRoot /var/www/vhost/
# Interdit tout le monde dans ce repertoire - Ok
<Directory /var/www/vhost/prive/>
deny from all
</Directory>
# Interdire tous les acces sauf depuis le reseau local
<Directory /var/www/vhost/prive/>
# on interdit par defaut puis on specifie explicitement les autorisations
Order deny,allow
# on autorise le reseau local
Allow from 192.168.0.0/16
# on interdit tout
Deny from all
</Directory>
# Interdire tous les acces sauf utilisateurs valides
<Directory /var/www/vhost/prive/>
Require valid-user
AuthName "Repertoire prive"
AuthType Basic
AuthUserFile /var/www/gpu/stats/.htpasswd
</Directory>
# Rem : creation fichier utilisateurs
# htpasswd -c fichier_passwords utilisateur
%%
===== Commandes utiles =====
==== Debian Etch / Apache 2.2 ====
##/etc/init.d/apache2 restart## arrêter Apache et le relancer
##/etc/init.d/apache2 reload## forcer Apache à relire son fichier de conf
##apache2ctl## configurer Apache
##a2ensite##, ##a2dissite## activer ou désactiver un site apache2 ou un virtual host
##a2enmod##, ##a2dismod## activer ou désactiver un module
===== SSL =====
http://www.debianadmin.com/install-and-configure-apache2-with-php5-and-ssl-support-in-debian-etch.html
voir aussi :
- [[PHP]]
- [[MySQL]]
- [[HTTP]]