HTTP Apache2 Webseite: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=FQDN setzen= *FQDN=www.xinux.de cat<<HERE>$FQDN.conf <VirtualHost *:80> ServerName www.xinux.de ServerAdmin webmaster@localhost Docum…“) |
|||
| (6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=FQDN setzen= | =FQDN setzen= | ||
*FQDN=www.xinux.de | *FQDN=www.xinux.de | ||
| − | cat<<HERE>$FQDN.conf | + | *cd /etc/apache2/sites-available |
| − | + | *cat<<HERE>$FQDN.conf | |
| + | <pre> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
| − | ServerName | + | ServerName $FQDN |
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
| − | DocumentRoot /var/www/html/ | + | DocumentRoot /var/www/html/$FQDN |
| − | ErrorLog ${APACHE_LOG_DIR}/error.log | + | ErrorLog \${APACHE_LOG_DIR}/$FQDN-error.log |
| − | CustomLog ${APACHE_LOG_DIR}/access.log combined | + | CustomLog \${APACHE_LOG_DIR}/$FQDN-access.log combined |
</VirtualHost> | </VirtualHost> | ||
| − | |||
HERE | HERE | ||
| + | </pre> | ||
| + | =Aktivieren= | ||
| + | *a2ensite $FQDN | ||
| + | =Reload= | ||
| + | *systemctl reload apache2 | ||
Aktuelle Version vom 15. August 2021, 17:03 Uhr
FQDN setzen
- FQDN=www.xinux.de
- cd /etc/apache2/sites-available
- cat<<HERE>$FQDN.conf
<VirtualHost *:80>
ServerName $FQDN
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/$FQDN
ErrorLog \${APACHE_LOG_DIR}/$FQDN-error.log
CustomLog \${APACHE_LOG_DIR}/$FQDN-access.log combined
</VirtualHost>
HERE
Aktivieren
- a2ensite $FQDN
Reload
- systemctl reload apache2