Apache2 fedora

Aus xinux.net
Zur Navigation springen Zur Suche springen

Installation

  • dnf install -y httpd mod_ssl

Key und Zertifkat plazieren

  • cd /etc/httpd
  • ls star*
star.kit.dkbi.com.crt  star.kit.dkbi.com.key

Die Konfiguration unserer Seite

<VirtualHost _default_:443>
ServerName it100.kit.dkbi.com
SSLEngine on
SSLCertificateFile /etc/httpd/star.kit.dkbi.com.crt
SSLCertificateKeyFile /etc/httpd/star.kit.dkbi.com.key
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

<Directory /usr/share/httpd/noindex>
    AllowOverride None
    Require all granted
</Directory>

Alias /.noindex.html /usr/share/httpd/noindex/index.html
Alias /poweredby.png /usr/share/httpd/icons/apache_pb3.png
Alias /system_noindex_logo.png /usr/share/httpd/icons/system_noindex_logo.png
</VirtualHost>

Wenn man der Firewall Daemon aktiv ist muss man noch eine Regel hinzufügen

Listing
  • firewall-cmd --list-service
cockpit dhcpv6-clienssh
Hinzufügen der Regeln
  • firewall-cmd --add-service https
  • firewall-cmd --add-service http
Listing
  • firewall-cmd --list-service
cockpit dhcpv6-client https http ssh

httpd neustarten

  • systemctl restart httpd