Apache2 fedora: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 26: Zeile 26:
 
Alias /system_noindex_logo.png /usr/share/httpd/icons/system_noindex_logo.png
 
Alias /system_noindex_logo.png /usr/share/httpd/icons/system_noindex_logo.png
 
</VirtualHost>
 
</VirtualHost>
</pre>
+
</pre>  
 +
=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

Aktuelle Version vom 25. Februar 2023, 12:07 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

httpd neustarten

  • systemctl restart httpd