keyhelp.conf | So korrekt?  [GELÖST]

Locked
User avatar
Justman10000
Posts: 190
Joined: Tue 15. Dec 2020, 16:40

keyhelp.conf | So korrekt?

Post by Justman10000 »

Wollte mal fragen, ob der Teil der Konfig so korrekt ist:

Code: Select all

<VirtualHost *:80>
    ServerName [hostname]
    Redirect 301 / https://[hostname]
</VirtualHost>

# Default page, if domain not available.
<VirtualHost *:80>
    ServerName [hostname]
    ServerAlias *.[hostname]
    Redirect / https://[hostname]/index.php?page=notavailable
</VirtualHost>
Tatsächlich funktionieren nämlich die Weiterleitungen auf HTTPS nicht mehr 😅
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: keyhelp.conf | So korrekt?  [GELÖST]

Post by Alexander »

Dazwischen fehlt halt einiges.
Am besten mal mit dem Template vergleichen. Achtung, in der Datei sind Platzhalter enthalten - alles zwischen doppelten #.

Code: Select all

[Ubuntu 18/20, Debian 9/19]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4-fcgid/keyhelp.conf 

[Ubuntu-16]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4/keyhelp.conf
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Justman10000
Posts: 190
Joined: Tue 15. Dec 2020, 16:40

Re: keyhelp.conf | So korrekt?

Post by Justman10000 »

Alexander wrote: Mon 14. Jun 2021, 10:15 Dazwischen fehlt halt einiges.
Am besten mal mit dem Template vergleichen. Achtung, in der Datei sind Platzhalter enthalten - alles zwischen doppelten #.

Code: Select all

[Ubuntu 18/20, Debian 9/19]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4-fcgid/keyhelp.conf 

[Ubuntu-16]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4/keyhelp.conf
Habe jetzt einfach mal das Template genommen und umgeschrieben, leitet jetzt wieder korrekt weiter! Und, bevor ich es wieder vergesse... Danke 😀
User avatar
Justman10000
Posts: 190
Joined: Tue 15. Dec 2020, 16:40

Re: keyhelp.conf | So korrekt?

Post by Justman10000 »

Alexander wrote: Mon 14. Jun 2021, 10:15 Dazwischen fehlt halt einiges.
Am besten mal mit dem Template vergleichen. Achtung, in der Datei sind Platzhalter enthalten - alles zwischen doppelten #.

Code: Select all

[Ubuntu 18/20, Debian 9/19]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4-fcgid/keyhelp.conf 

[Ubuntu-16]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4/keyhelp.conf
Nun habe ich diesen Auschnitt:

Code: Select all

    # KeyHelp
    <Directory "/home/keyhelp/www/keyhelp">
        <Files "license.txt">
            Require all denied
        </Files>
        Require all granted
        AllowOverride All
    </Directory>
    <Directory "/home/keyhelp/www/keyhelp/bin/">
        Require all denied
    </Directory>

    # Statistics
    <Directory "/home/keyhelp/www/kh.webstats">
        Require all denied
        Options FollowSymLinks
        AllowOverride AuthConfig
    </Directory>

    # DB administration
    <Directory "/home/keyhelp/www/db-administration">
        Require all granted
        AllowOverride All
    </Directory>

    # Webmail
    <Directory "/home/keyhelp/www/webmail">
        Require all granted
        AllowOverride All
    </Directory>
Der Server meckert aber schon wieder:

Image
User avatar
OlliTheDarkness
Posts: 1854
Joined: Tue 14. Aug 2018, 16:41
Location: Essen (NRW)

Re: keyhelp.conf | So korrekt?

Post by OlliTheDarkness »

Justman10000 wrote: Mon 14. Jun 2021, 16:46
Alexander wrote: Mon 14. Jun 2021, 10:15 Dazwischen fehlt halt einiges.
Am besten mal mit dem Template vergleichen. Achtung, in der Datei sind Platzhalter enthalten - alles zwischen doppelten #.

Code: Select all

[Ubuntu 18/20, Debian 9/19]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4-fcgid/keyhelp.conf 

[Ubuntu-16]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4/keyhelp.conf
Nun habe ich diesen Auschnitt:

Code: Select all

    # KeyHelp
    <Directory "/home/keyhelp/www/keyhelp">
        <Files "license.txt">
            Require all denied
        </Files>
        Require all granted
        AllowOverride All
    </Directory>
    <Directory "/home/keyhelp/www/keyhelp/bin/">
        Require all denied
    </Directory>

    # Statistics
    <Directory "/home/keyhelp/www/kh.webstats">
        Require all denied
        Options FollowSymLinks
        AllowOverride AuthConfig
    </Directory>

    # DB administration
    <Directory "/home/keyhelp/www/db-administration">
        Require all granted
        AllowOverride All
    </Directory>

    # Webmail
    <Directory "/home/keyhelp/www/webmail">
        Require all granted
        AllowOverride All
    </Directory>
Der Server meckert aber schon wieder:


Alle HOSTNAME durch deine Host Domain ersetzen ...

Code: Select all


#
#  _  __          _   _     _      (R)
# | |/ /___ _   _| |_| |___| |___
# | | /  -_) |_/ |  _  | -_) | _ \
# |_|\_\___|\__, |_| |_|___|_|  _/
#           |___/            |_|
#
# Webserver configuration for apache 2.4-fcgid
#

# Log format
<IfModule mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" keyhelp_log
</IfModule>
<IfModule !mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" 0 0" keyhelp_log
</IfModule>

# KeyHelp / Tools
<VirtualHost *:443>
    ServerName HOSTNAME
    ServerAdmin root@HOSTNAME

    DocumentRoot /home/keyhelp/www/keyhelp
    Options -Indexes
    SuexecUserGroup "keyhelp" "keyhelp"

    # Logging
    LogLevel warn
    CustomLog "${APACHE_LOG_DIR}/keyhelp/access.log" combined
    ErrorLog "${APACHE_LOG_DIR}/keyhelp/error.log"

    # SSL/TLS
    SSLEngine On
    SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
    SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt

    # Aliases
    Alias /awstats-icons      "/usr/share/awstats/icon"
    Alias /db-administration  "/home/keyhelp/www/db-administration"
    Alias /webmail            "/home/keyhelp/www/webmail"
    Alias /webstats           "/home/keyhelp/www/kh.webstats"
    # Compatibility aliases (do not break existing bookmarks)
    Alias /phpmyadmin         "/home/keyhelp/www/db-administration"

    # Autoconfig / Autodiscover
    AliasMatch (?i)^/autoconfig(.*)   /home/keyhelp/www/keyhelp/misc/emailconfig$1
    AliasMatch (?i)^/autodiscover(.*) /home/keyhelp/www/keyhelp/misc/emailconfig$1

    # PHP files
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/keyhelp_keyhelp.socket|fcgi://keyhelp_keyhelp.socket"
    </FilesMatch>

    # Set some proxy properties (the string "unique-domain-name-string" should match
    # the one set in the FilesMatch directive.
    <Proxy fcgi://keyhelp_keyhelp.socket>
        ProxySet connectiontimeout=5 timeout=120
    </Proxy>

    # KeyHelp
    <Directory "/home/keyhelp/www/keyhelp">
        <Files "license.txt">
            Require all denied
        </Files>
        Require all granted
        AllowOverride All
    </Directory>
    <Directory "/home/keyhelp/www/keyhelp/bin/">
        Require all denied
    </Directory>

    # Statistics
    <Directory "/home/keyhelp/www/kh.webstats">
        Require all denied
        Options FollowSymLinks
        AllowOverride AuthConfig
    </Directory>

    # DB administration
    <Directory "/home/keyhelp/www/db-administration">
        Require all granted
        AllowOverride All
    </Directory>

    # Webmail
    <Directory "/home/keyhelp/www/webmail">
        Require all granted
        AllowOverride All
    </Directory>

    # Mime types
    <IfModule mod_mime.c>
        # Fonts
        AddType font/woff2 woff2
    </IfModule>

    # Expire headers
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault                          "access plus 1 days"
        # Data
        ExpiresByType text/xml                  "access plus 0 seconds"
        ExpiresByType text/html                 "access plus 0 seconds"
        ExpiresByType text/plain                "access plus 0 seconds"
        ExpiresByType application/xml           "access plus 0 seconds"
        ExpiresByType application/json          "access plus 0 seconds"
        # Scripts
        ExpiresByType text/css                  "access plus 1 month"
        ExpiresByType text/javascript           "access plus 1 month"
        ExpiresByType application/javascript    "access plus 1 month"
        ExpiresByType application/x-javascript  "access plus 1 month"
        # Images / Icons
        ExpiresByType image/gif                 "access plus 1 month"
        ExpiresByType image/png                 "access plus 1 month"
        ExpiresByType image/jpg                 "access plus 1 month"
        ExpiresByType image/jpeg                "access plus 1 month"
        ExpiresByType image/svg+xml             "access plus 1 month"
        ExpiresByType image/vnd.microsoft.icon  "access plus 1 month"
        ExpiresByType image/ico                 "access plus 1 month"
        ExpiresByType image/x-icon              "access plus 1 month"
        # Fonts
        ExpiresByType font/truetype             "access plus 1 month"
        ExpiresByType font/opentype             "access plus 1 month"
        ExpiresByType application/x-font-ttf    "access plus 1 month"
        ExpiresByType application/x-font-woff   "access plus 1 month"
        ExpiresByType application/font-woff     "access plus 1 month"
        ExpiresByType font/woff2                "access plus 1 month"
        # Others
        ExpiresByType application/pdf           "access plus 1 month"
    </IfModule>
</VirtualHost>

# Redirect HTTP -> HTTPS
<VirtualHost *:80>
    ServerName HOSTNAME

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]).*$
        RewriteRule ^(.*)$ https://%{HTTP_HOST}/
    </IfModule>

    Redirect / https://HOSTNAME/
</VirtualHost>

# User vhosts
IncludeOptional keyhelp/vhosts/*.conf

# Webmail subdomain
Include keyhelp/webmail.conf

# Autoconfig subdomain
Include keyhelp/autoconfig.conf

# Subdomain catch-all
IncludeOptional keyhelp/subdomain_catch_all.conf

# Default page, if domain not available.
<VirtualHost *:443>
    ServerName HOSTNAME
    ServerAlias *.HOSTNAME
    SSLEngine On
    SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
    SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt
    Redirect / https://HOSTNAME/index.php?page=notavailable
</VirtualHost>

# Default page | Redirect HTTP -> HTTPS
<VirtualHost *:80>
    ServerName HOSTNAME
    ServerAlias *.HOSTNAME
    Redirect / https://HOSTNAME/index.php?page=notavailable
</VirtualHost>
Mit freundlichen Grüßen
OlliTheDarkness

**************************************************************
Helden leben lange, Legenden sterben nie

:!: World Hack Organization :!:
**************************************************************
User avatar
Justman10000
Posts: 190
Joined: Tue 15. Dec 2020, 16:40

Re: keyhelp.conf | So korrekt?

Post by Justman10000 »

OlliTheDarkness wrote: Mon 14. Jun 2021, 17:01
Justman10000 wrote: Mon 14. Jun 2021, 16:46
Alexander wrote: Mon 14. Jun 2021, 10:15 Dazwischen fehlt halt einiges.
Am besten mal mit dem Template vergleichen. Achtung, in der Datei sind Platzhalter enthalten - alles zwischen doppelten #.

Code: Select all

[Ubuntu 18/20, Debian 9/19]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4-fcgid/keyhelp.conf 

[Ubuntu-16]
/home/keyhelp/www/keyhelp/install/templates/apache/2.4/keyhelp.conf
Nun habe ich diesen Auschnitt:

Code: Select all

    # KeyHelp
    <Directory "/home/keyhelp/www/keyhelp">
        <Files "license.txt">
            Require all denied
        </Files>
        Require all granted
        AllowOverride All
    </Directory>
    <Directory "/home/keyhelp/www/keyhelp/bin/">
        Require all denied
    </Directory>

    # Statistics
    <Directory "/home/keyhelp/www/kh.webstats">
        Require all denied
        Options FollowSymLinks
        AllowOverride AuthConfig
    </Directory>

    # DB administration
    <Directory "/home/keyhelp/www/db-administration">
        Require all granted
        AllowOverride All
    </Directory>

    # Webmail
    <Directory "/home/keyhelp/www/webmail">
        Require all granted
        AllowOverride All
    </Directory>
Der Server meckert aber schon wieder:


Alle HOSTNAME durch deine Host Domain ersetzen ...

Code: Select all


#
#  _  __          _   _     _      (R)
# | |/ /___ _   _| |_| |___| |___
# | | /  -_) |_/ |  _  | -_) | _ \
# |_|\_\___|\__, |_| |_|___|_|  _/
#           |___/            |_|
#
# Webserver configuration for apache 2.4-fcgid
#

# Log format
<IfModule mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" keyhelp_log
</IfModule>
<IfModule !mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" 0 0" keyhelp_log
</IfModule>

# KeyHelp / Tools
<VirtualHost *:443>
    ServerName HOSTNAME
    ServerAdmin root@HOSTNAME

    DocumentRoot /home/keyhelp/www/keyhelp
    Options -Indexes
    SuexecUserGroup "keyhelp" "keyhelp"

    # Logging
    LogLevel warn
    CustomLog "${APACHE_LOG_DIR}/keyhelp/access.log" combined
    ErrorLog "${APACHE_LOG_DIR}/keyhelp/error.log"

    # SSL/TLS
    SSLEngine On
    SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
    SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt

    # Aliases
    Alias /awstats-icons      "/usr/share/awstats/icon"
    Alias /db-administration  "/home/keyhelp/www/db-administration"
    Alias /webmail            "/home/keyhelp/www/webmail"
    Alias /webstats           "/home/keyhelp/www/kh.webstats"
    # Compatibility aliases (do not break existing bookmarks)
    Alias /phpmyadmin         "/home/keyhelp/www/db-administration"

    # Autoconfig / Autodiscover
    AliasMatch (?i)^/autoconfig(.*)   /home/keyhelp/www/keyhelp/misc/emailconfig$1
    AliasMatch (?i)^/autodiscover(.*) /home/keyhelp/www/keyhelp/misc/emailconfig$1

    # PHP files
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/keyhelp_keyhelp.socket|fcgi://keyhelp_keyhelp.socket"
    </FilesMatch>

    # Set some proxy properties (the string "unique-domain-name-string" should match
    # the one set in the FilesMatch directive.
    <Proxy fcgi://keyhelp_keyhelp.socket>
        ProxySet connectiontimeout=5 timeout=120
    </Proxy>

    # KeyHelp
    <Directory "/home/keyhelp/www/keyhelp">
        <Files "license.txt">
            Require all denied
        </Files>
        Require all granted
        AllowOverride All
    </Directory>
    <Directory "/home/keyhelp/www/keyhelp/bin/">
        Require all denied
    </Directory>

    # Statistics
    <Directory "/home/keyhelp/www/kh.webstats">
        Require all denied
        Options FollowSymLinks
        AllowOverride AuthConfig
    </Directory>

    # DB administration
    <Directory "/home/keyhelp/www/db-administration">
        Require all granted
        AllowOverride All
    </Directory>

    # Webmail
    <Directory "/home/keyhelp/www/webmail">
        Require all granted
        AllowOverride All
    </Directory>

    # Mime types
    <IfModule mod_mime.c>
        # Fonts
        AddType font/woff2 woff2
    </IfModule>

    # Expire headers
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault                          "access plus 1 days"
        # Data
        ExpiresByType text/xml                  "access plus 0 seconds"
        ExpiresByType text/html                 "access plus 0 seconds"
        ExpiresByType text/plain                "access plus 0 seconds"
        ExpiresByType application/xml           "access plus 0 seconds"
        ExpiresByType application/json          "access plus 0 seconds"
        # Scripts
        ExpiresByType text/css                  "access plus 1 month"
        ExpiresByType text/javascript           "access plus 1 month"
        ExpiresByType application/javascript    "access plus 1 month"
        ExpiresByType application/x-javascript  "access plus 1 month"
        # Images / Icons
        ExpiresByType image/gif                 "access plus 1 month"
        ExpiresByType image/png                 "access plus 1 month"
        ExpiresByType image/jpg                 "access plus 1 month"
        ExpiresByType image/jpeg                "access plus 1 month"
        ExpiresByType image/svg+xml             "access plus 1 month"
        ExpiresByType image/vnd.microsoft.icon  "access plus 1 month"
        ExpiresByType image/ico                 "access plus 1 month"
        ExpiresByType image/x-icon              "access plus 1 month"
        # Fonts
        ExpiresByType font/truetype             "access plus 1 month"
        ExpiresByType font/opentype             "access plus 1 month"
        ExpiresByType application/x-font-ttf    "access plus 1 month"
        ExpiresByType application/x-font-woff   "access plus 1 month"
        ExpiresByType application/font-woff     "access plus 1 month"
        ExpiresByType font/woff2                "access plus 1 month"
        # Others
        ExpiresByType application/pdf           "access plus 1 month"
    </IfModule>
</VirtualHost>

# Redirect HTTP -> HTTPS
<VirtualHost *:80>
    ServerName HOSTNAME

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]).*$
        RewriteRule ^(.*)$ https://%{HTTP_HOST}/
    </IfModule>

    Redirect / https://HOSTNAME/
</VirtualHost>

# User vhosts
IncludeOptional keyhelp/vhosts/*.conf

# Webmail subdomain
Include keyhelp/webmail.conf

# Autoconfig subdomain
Include keyhelp/autoconfig.conf

# Subdomain catch-all
IncludeOptional keyhelp/subdomain_catch_all.conf

# Default page, if domain not available.
<VirtualHost *:443>
    ServerName HOSTNAME
    ServerAlias *.HOSTNAME
    SSLEngine On
    SSLCertificateFile /etc/ssl/keyhelp/keyhelp.pem
    SSLCertificateChainFile /etc/ssl/keyhelp/keyhelp-ca.crt
    Redirect / https://HOSTNAME/index.php?page=notavailable
</VirtualHost>

# Default page | Redirect HTTP -> HTTPS
<VirtualHost *:80>
    ServerName HOSTNAME
    ServerAlias *.HOSTNAME
    Redirect / https://HOSTNAME/index.php?page=notavailable
</VirtualHost>
Okay? Weiß jetzt nicht, was gefehlt hat... Aber jetzt auch ein Danke an dir 😀...
Locked