Einzelheiten zur Apache-Konfiguration

Aus Debacher-Wiki
Version vom 12. November 2014, 15:59 Uhr von Debacher (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Ziel bei der Konfiguration ist es nur mit virtuellen Servern zu arbeiten. Dazu deaktiviere ich im ersten Schritt einen Teil der Standardvorgaben. /etc/apache2…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springenZur Suche springen

Ziel bei der Konfiguration ist es nur mit virtuellen Servern zu arbeiten. Dazu deaktiviere ich im ersten Schritt einen Teil der Standardvorgaben.

/etc/apache2/vhosts.d/00_default.conf


ServerName default ServerAdmin Uwe@Debacher.de

ServerTokens Major

DocumentRoot /srv/www/htdocs

Alias /groupoffice /srv/www/htdocs/groupoffice Alias /squirrelmail /srv/www/htdocs/squirrelmail Alias /webmail /srv/www/roundcubemail


<Directory "/srv/www/vhosts">

       AllowOverride All
  1. Options SymLinksIfOwnerMatch
       Options +FollowSymLinks
       Order allow,deny
       Allow from all
       <IfModule mod_php5.c>
  1. php_admin_flag engine off
  2. php_admin_value open_basedir "/srv/www/vhosts:/tmp:./"
  3. php_admin_value include_path "/srv/www/vhosts:./"
       </IfModule>

</Directory>


<IfModule mod_userdir.c>

       UserDir disabled

</IfModule>


<VirtualHost *:80>

       ServerName default
       UseCanonicalName Off
       DocumentRoot /srv/www/vhosts/default/httpdocs
       ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
       Alias /groupoffice  /srv/www/htdocs/phpmyadmin
       Alias /squirrelmail /srv/www/htdocs/phpmyadmin
       Alias /webmail      /srv/www/htdocs/phpmyadmin
       Alias /postfixadmin /srv/www/htdocs/phpmyadmin
       Alias /phpMyAdmin   /srv/www/htdocs/phpmyadmin
       Alias /roundcube    /srv/www/htdocs/phpmyadmin
       <IfDefine MAILMAN>
          ScriptAlias     /mailman/       /srv/www/htdocs/phpmyadmin
          Alias           /mailmanicons/  /srv/www/htdocs/phpmyadmin
          Alias           /pipermail/     /srv/www/htdocs/phpmyadmin
   I    00_default.conf              Row 91   Col 1    3:59  Ctrl-K H for help
       Alias /roundcube    /srv/www/htdocs/phpmyadmin
       <IfDefine MAILMAN>
          ScriptAlias     /mailman/       /srv/www/htdocs/phpmyadmin
          Alias           /mailmanicons/  /srv/www/htdocs/phpmyadmin
          Alias           /pipermail/     /srv/www/htdocs/phpmyadmin
       </IfDefine>
       <IfModule mod_ssl.c>
               SSLEngine off
       </IfModule>
       <Directory "/srv/www/cgi-bin/">
               AllowOverride None
               Options None
               Order allow,deny
               Deny from all   
       </Directory>
       <Directory /srv/www/vhosts/default/httpdocs>
               AllowOverride All
               Options None
               Order allow,deny
               Allow from all  
               <IfModule mod_php5.c>
                 php_admin_flag engine on
                 php_admin_flag safe_mode off
  1. php_admin_value include_path "/srv/www/htdocs/horde/pear:/sr
  2. php_admin_value open_basedir "/srv/www/htdocs:/tmp"
               </IfModule>
       </Directory>

</VirtualHost> <IfModule mod_ssl.c>

<VirtualHost *:443 >
       ServerName default
       UseCanonicalName Off
       DocumentRoot /srv/www/vhosts/default/httpsdocs
       ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
       Alias /groupoffice  /srv/www/htdocs/phpmyadmin
       Alias /squirrelmail /srv/www/htdocs/phpmyadmin
       Alias /webmail      /srv/www/htdocs/phpmyadmin
       Alias /postfixadmin /srv/www/htdocs/phpmyadmin
       Alias /phpMyAdmin   /srv/www/htdocs/phpmyadmin
       Alias /roundcube    /srv/www/htdocs/phpmyadmin
       <IfDefine MAILMAN>
          ScriptAlias     /mailman/       /srv/www/htdocs/phpmyadmin
          Alias           /mailmanicons/  /srv/www/htdocs/phpmyadmin
          Alias           /pipermail/     /srv/www/htdocs/phpmyadmin
       </IfDefine>
       SSLEngine on
       SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNUL
       SSLCertificateFile /srv/www/vhosts/default/ssl/server.crt
       SSLCertificateKeyFile /srv/www/vhosts/default/ssl/server.key
       <Directory "/srv/www/cgi-bin/">
               AllowOverride None
               Options None
               Order allow,deny
               Deny from all
       </Directory>
       <Directory /srv/www/vhosts/default/httpsdocs>
               SSLRequireSSL
               AllowOverride None
               Options None
               Order allow,deny
               Allow from all
       </Directory>
</VirtualHost>

</IfModule>