HTTP Apache2 Webseite: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=FQDN setzen= | =FQDN setzen= | ||
*FQDN=www.xinux.de | *FQDN=www.xinux.de | ||
| − | *cd /etc/apache2/ | + | *cd /etc/apache2/sites-available |
*cat<<HERE>$FQDN.conf | *cat<<HERE>$FQDN.conf | ||
<pre> | <pre> | ||
| Zeile 8: | Zeile 8: | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html/$FQDN | DocumentRoot /var/www/html/$FQDN | ||
| − | ErrorLog ${APACHE_LOG_DIR}/$FQDN-error.log | + | ErrorLog \${APACHE_LOG_DIR}/$FQDN-error.log |
| − | CustomLog ${APACHE_LOG_DIR}/$FQDN-access.log combined | + | CustomLog \${APACHE_LOG_DIR}/$FQDN-access.log combined |
</VirtualHost> | </VirtualHost> | ||
HERE | HERE | ||
</pre> | </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