Konfigurationsdateien

Folgende Dateien (configuration\config.xxx.php) sind für die Konfiguration / Anpassung von Bedeutung:

config.db.phpdefiniert den Datenbankzugriff
config.mail.phpdefiniert die E-Mail-Verwendung
config.server.phpdefiniert die Q-GUIDE-Verbindungsinformationen

Alle anderen Dateien sollten nicht durch Sie geändert werden.

Je nach Webserver (MS IIS oder Apache) wird die eine oder andere Datei verwendet:

web.configist eine XML-basierte Datei, die alle Einstellungen des Microsoft Internet Information Server (MS IIS) für die Q-GUIDE-Web-Applikation beinhaltet
.htaccessist eine reine Textdatei, die alle Einstellungen des Apache-Webservers für die Q-GUIDE-Web-Applikation beinhaltet

Datei - config.db.php

Die Datei beinhaltet die Datenbank-Verbindungsinformationen entsprechend der initialen Konfiguration.

Beispielinhalt:

<?php
$_CONFIG['db'] = array(
    'host'    => 'localhost',
    'user'    => 'user',
    'pwd'     => 'password',
    'name'    => 'qguide',
    'type'    => 'mysql',
    'charset' => 'utf8'
);
?>

Datei - config.mail.php

Die Datei beinhaltet die E-Mail-Informationen entsprechend der initialen Konfiguration.

Beispielinhalt:

<?php
$_CONFIG['mailconfig'] = array(
    'email' => 'mail@localhost',  // Achtung! In vielen Fällen ist es notwendig,
                                   // dass der Absender der Mailadresse entspricht,
                                   // die für den SMTP-Versand eingestellt wurde
    'name' => 'Q-GUIDE Email',
    'typ' => 'mail',              // Options: "mail", "sendmail", or "smtp".
    'smtphost' => '',
    'smtpport' => 25,             // Default: 25
    'smtpsecure' => '',           // Options: "", "ssl" or "tls"
    'smtpauth' => false,          // Uses the Username and Password properties (true | false)
    'smtpuser' => '',
    'smtppass' => '',
    'authtype' => 'LOGIN',        // Options are LOGIN, PLAIN, NTLM, CRAM-MD5
    'timeout' => 300,
    'sendmailpath' => '/usr/sbin/sendmail',
    'deaktiviert' => true,
);
?>

Datei - config.server.php

Die Datei beinhaltet die Q-GUIDE-Verbindungsinformationen entsprechend der initialen Konfiguration.

Beispielinhalt:

<?php
$_CONFIG['device'] = 'auto';
$_CONFIG['rooturl'] = '/qguide/';
$_CONFIG['serverurl'] = 'http://q-gui.de/qguide/';
$_CONFIG['url'] = array(
    'image' => '/img/',
    'slides' => '/slides/',
    'topics' => '/topics/',
    'userimport' => '/userimport/',
);
?>

Datei - web.config / .htaccess

Die Datei beinhaltet die Umschreibungsinformationen entsprechend der initialen Konfiguration.

Beispielinhalt - web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
    <rewrite>
        <rules>
            <rule name="Exception" stopProcessing="true">
                <match url="^(.*)$" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                    <add input="{URL}" pattern="qguide_help/(.*)\." ignoreCase="false" />
                </conditions>
                <action type="None" />
            </rule>
            <rule name="Imported Rule 1" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" ignoreCase="false" />
                    <add input="{REQUEST_FILENAME}" pattern="\.(js|css)$" ignoreCase="false" />
                    <add input="{REQUEST_FILENAME}.gz" matchType="IsFile" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" url="/{R:1}.gz" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 2" stopProcessing="true">
                <match url="^(.*)\.(html|xml|do)" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{QUERY_STRING}" pattern="(.*)" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" url="index.php?epsevar={R:1}&epsedoc={R:2}&{C:1}" appendQueryString="false" />
            </rule>
            <rule name="Imported Rule 3" stopProcessing="true">
                <match url="^(.*)$" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{URL}" matchType="Pattern"
                        pattern="\.(jpg|jpeg|png|htm|gif|txt|css|js|swf|php|pdf|xml|zip|mp3|ico|gz|svg|woff2|woff|ttf|eot|mp4|xsd)$"
                        ignoreCase="false" negate="true" />
                    <add input="{URL}" pattern="files/(.*)\." ignoreCase="false" negate="true" />
                    <add input="{URL}" pattern="flash/(.*)\." ignoreCase="false" negate="true" />
                    <add input="{URL}" pattern="img/(.*)\." ignoreCase="false" negate="true" />
                    <add input="{URL}" pattern="^/$" negate="true" />
                </conditions>
                <action type="Redirect" url="index.html" redirectType="Found" />
            </rule>
            <rule name="Imported Rule 4" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions logicalGrouping="MatchAny">
                    <add input="{QUERY_STRING}" pattern="^.*(localhost|loopback|127\.0\.0\.1).*" />
                    <add input="{QUERY_STRING}" pattern="^.*(\*|;|&lt;|>|'|&quot;|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*" />
                    <add input="{QUERY_STRING}" pattern="^.*(benchmark|union|select|insert|cast|declare|drop|update).*" />
                </conditions>
                <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
            </rule>
        </rules>
    </rewrite>
        <staticContent>
            <remove fileExtension=".woff" />
            <remove fileExtension=".woff2" />
            <remove fileExtension=".mp4" />
            <remove fileExtension=".m4v" />
            <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
            <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
            <mimeMap fileExtension=".m4v" mimeType="video/m4v" />
        </staticContent>
    </system.webServer>
</configuration>

Beispielinhalt - .htaccess:

ErrorDocument 404 /404.html

AddEncoding gzip .gz
<filesmatch "\.js\.gz$">
    AddType "text/javascript" .gz
</filesmatch>
<filesmatch "\.css\.gz$">
    AddType "text/css" .gz
</filesmatch>

AddType image/svg+xml svg svgz
AddEncoding gzip svgz

RewriteEngine On
RewriteBase /qguide/

RewriteCond %{REQUEST_URI} qguide_help/(.*)\.
RewriteRule ^(.*)$ - [L]

RewriteCond %{REQUEST_URI} qguide_themebuilder/(.*)\.
RewriteRule ^(.*)$ - [L]

RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME} \.(js|css)$
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ /$1.gz [QSA,L]

RewriteCond %{QUERY_STRING} (.*)
RewriteRule ^(.*)\.(html|xml|do) /qguide/index.php?epsevar=$1&epsedoc=$2&%1 [NC,L]

RewriteCond %{REQUEST_URI} !\.(jpg|jpeg|png|gif|txt|css|js|swf|php|pdf|xml|zip|mp3|ico|gz|svg|woff2|woff|ttf|eot|mp4|xsd|mpg|mpeg|mov|avi)$
RewriteCond %{REQUEST_URI} !files/(.*)\.
RewriteCond %{REQUEST_URI} !flash/(.*)\.
RewriteCond %{REQUEST_URI} !img/(.*)\.
RewriteCond %{REQUEST_URI} !^/$ [NC]
RewriteRule ^(.*)$ /index.html [R,NC,L]

RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).*                [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(\*|;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*      [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(benchmark|union|select|insert|cast|declare|drop|update).* [NC]
RewriteRule ^(.*)$ - [F,L]