Apache2 fedora: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 36: Zeile 36:
 
;Listing
 
;Listing
 
*firewall-cmd --list-service
 
*firewall-cmd --list-service
  cockpit dhcpv6-client https ssh
+
  cockpit dhcpv6-client https http ssh
  
 
*
 
*

Version vom 25. Februar 2023, 12:06 Uhr

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