Outils pour utilisateurs

Outils du site

Panneau latéral


Configuration Apache

Activation des modules Apaches

a2enmod rewrite expires deflate headers
service apache2 restart

Création de du compte d'installation

Comme nous avons installé Apache en mode MPM-ITK, nous allons créé un utilisateur système spécialement pour notre site, et c'est cet utilisateur qui sera utilisé par Apache.

adduser rbschange
Adding user `rbschange' ...
Adding new group `rbschange' (1001) ...
Adding new user `rbschange' (1001) with group `rbschange' ...
Creating home directory `/home/rbschange' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for rbschange
Enter the new value, or press ENTER for the default
	Full Name []: Demo RBSChange vhost
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] Y

Créer le dossier de stockage des sessions :

mkdir /home/rbschange/sessions
chown -R rbschange:rbschange /home/rbschange/sessions


<VirtualHost _default_:80>
    ServerName rbschange.local.fr

    # User and group used by Apache (Only with mpm-itk)
    AssignUserID rbschange rbschange

    ServerAdmin admin@rbschange.local.fr
    ## Uncomment line below for Debian, Ubuntu...
    #CustomLog /var/log/apache2/rbschange.local.fr.log combined
    #ErrorLog /var/log/apache2/rbschange.local.fr.log.error.log
    ## Uncomment line below for RHEL, CentOS....
    #CustomLog /var/log/httpd/rbschange.local.fr_log combined
    #ErrorLog /var/log/httpd/rbschange.local.fr._error_log
    # specific types for Change backoffice
    AddType application/x-xpinstall .xpi
    AddType application/vnd.mozilla.xul+xml .xul
    AddType text/xml .rdf .xbl

    # Expires header
    <IfModule expires>
        ExpiresActive On
        ExpiresByType image/gif A7200
        ExpiresByType image/png A7200
        ExpiresByType image/jpeg A7200
        ExpiresByType text/css A7200
        ExpiresByType text/javasript A7200
        ExpiresByType application/x-javascript A7200
        ExpiresByType application/x-shockwave-flash A7200
    # Text data compression
    <IfModule deflate>
        AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
        DeflateCompressionLevel 1
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4.0[678] no-gzip
        BrowserMatch bMSIE !no-gzip !gzip-only-text/html
    # PHP configuration
    php_flag short_open_tag off
    php_flag magic_quotes_gpc off
    php_value memory_limit 192M
    php_value post_max_size 60M
    php_value upload_max_filesize 60M
    php_value default_charset utf-8
    php_value session.cache_limiter " "
    # You may want to change your sessions path
    php_value session.save_path /home/rbschange/sessions
    # Don't forget to modify DocumentRoot value here
    DocumentRoot /home/rbschange/www
    <Directory /home/rbschange/www>
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all

install/sys_install/config_apache.txt · Dernière modification: 2017/01/19 14:54 (modification externe)