Wordpress: Unterschied zwischen den Versionen
Aus Vosp.info
F (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „ == apache conf == * /etc/apache2/sites-available/wpseite.de.conf <source lang=> <VirtualHost *:80> ServerName wpseite.de ServerAlias www.wpsei…“) |
F (Diskussion | Beiträge) (→install wordpress) |
||
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
+ | = Konfiguration = | ||
+ | |||
+ | == Themes == | ||
+ | |||
+ | * Twenty Fifteen Version: 2.8 | ||
+ | ** relative einfache Seite | ||
+ | |||
+ | = Installation = | ||
== apache conf == | == apache conf == | ||
* /etc/apache2/sites-available/wpseite.de.conf | * /etc/apache2/sites-available/wpseite.de.conf | ||
− | <source lang=> | + | <source lang=xml> |
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerName wpseite.de | ServerName wpseite.de | ||
ServerAlias www.wpseite.de | ServerAlias www.wpseite.de | ||
− | DocumentRoot /var/www/ | + | DocumentRoot /var/www/wpseite.server.tld |
ErrorLog ${APACHE_LOG_DIR}/error.wpseite.de.log | ErrorLog ${APACHE_LOG_DIR}/error.wpseite.de.log | ||
CustomLog ${APACHE_LOG_DIR}/access.wpseite.de.log combined | CustomLog ${APACHE_LOG_DIR}/access.wpseite.de.log combined | ||
Zeile 20: | Zeile 28: | ||
ServerSignature Off | ServerSignature Off | ||
− | <Directory /var/www/ | + | <Directory /var/www/wpseite.server.tld/> |
AllowOverride All | AllowOverride All | ||
Order allow,deny | Order allow,deny | ||
Zeile 26: | Zeile 34: | ||
</Directory> | </Directory> | ||
</VirtualHost> | </VirtualHost> | ||
+ | </source> | ||
+ | |||
+ | * /etc/apache2/sites-available/wpseite.server.tld.conf | ||
+ | <source lang=xml> | ||
+ | <VirtualHost *:80> | ||
+ | ServerName wpseite.server.tld | ||
+ | ServerAdmin webmaster@localhost | ||
+ | Redirect permanent / https://wpseite.server.tld/ | ||
+ | ServerSignature Off | ||
+ | |||
+ | </VirtualHost> | ||
+ | |||
+ | <VirtualHost *:443> | ||
+ | SSLEngine On | ||
+ | ServerName wpseite.server.tld | ||
+ | ServerAdmin webmaster@localhost | ||
+ | DocumentRoot /var/www/wpseite.server.tld | ||
+ | LogLevel info | ||
+ | ErrorLog ${APACHE_LOG_DIR}/error.wpseite.server.tld.log | ||
+ | CustomLog ${APACHE_LOG_DIR}/access.wpseite.server.tld.log combined | ||
+ | <Directory /var/www/wpseite.server.tld/> | ||
+ | # Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride all | ||
+ | # | ||
+ | AuthType Basic | ||
+ | AuthName "Authentication Required" | ||
+ | AuthUserFile "/etc/htpasswd/htpasswd" | ||
+ | Require valid-user | ||
+ | Order allow,deny | ||
+ | # | ||
+ | Allow from all | ||
+ | Options -MultiViews | ||
+ | </Directory> | ||
+ | ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | ||
+ | <Directory "/usr/lib/cgi-bin"> | ||
+ | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | ||
+ | Order allow,deny | ||
+ | Require all granted | ||
+ | </Directory> | ||
+ | ServerSignature Off | ||
+ | |||
+ | SSLCertificateKeyFile /etc/ssl/private/live/privkey.pem | ||
+ | SSLCertificateFile /etc/ssl/private/live/cert.pem | ||
+ | SSLCertificateChainFile /etc/ssl/private/live/chain.pem | ||
+ | |||
+ | SetEnv nokeepalive ssl-unclean-shutdown | ||
+ | ServerSignature Off | ||
+ | |||
+ | </VirtualHost> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | == install wordpress == | ||
+ | * https://wordpress.org/support/article/how-to-install-wordpress/ | ||
+ | <source lang=bash> | ||
+ | wget https://wordpress.org/latest.tar.gz | ||
+ | tar -xzvf latest.tar.gz | ||
+ | # datenbankdaten eintragen | ||
+ | vim wp-config.php | ||
+ | </source> | ||
+ | |||
+ | == mysql == | ||
+ | * mysql -u root -p | ||
+ | <source lang=sql> | ||
+ | |||
+ | create database DATABASE; | ||
+ | create user 'USERNAME'@'localhost' identified by 'PASSWORD'; | ||
+ | grant all on DATABASE.* to 'USERNAME'@'localhost'; | ||
+ | FLUSH PRIVILEGES; | ||
+ | |||
</source> | </source> |
Aktuelle Version vom 14. Juni 2021, 20:59 Uhr
Inhaltsverzeichnis
Konfiguration
Themes
- Twenty Fifteen Version: 2.8
- relative einfache Seite
Installation
apache conf
- /etc/apache2/sites-available/wpseite.de.conf
<VirtualHost *:80>
ServerName wpseite.de
ServerAlias www.wpseite.de
DocumentRoot /var/www/wpseite.server.tld
ErrorLog ${APACHE_LOG_DIR}/error.wpseite.de.log
CustomLog ${APACHE_LOG_DIR}/access.wpseite.de.log combined
RewriteEngine On
# ohne www erzwingen
RewriteCond %{HTTP_HOST} ^www.wpseite\.de$ [NC]
RewriteRule ^(.*)$ http://wpseite.de/$1 [R=301,L]
# backend deaktivieren
Redirect /wp-login.php /
Redirect /wp-admin /
ServerSignature Off
<Directory /var/www/wpseite.server.tld/>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
- /etc/apache2/sites-available/wpseite.server.tld.conf
<VirtualHost *:80>
ServerName wpseite.server.tld
ServerAdmin webmaster@localhost
Redirect permanent / https://wpseite.server.tld/
ServerSignature Off
</VirtualHost>
<VirtualHost *:443>
SSLEngine On
ServerName wpseite.server.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/wpseite.server.tld
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.wpseite.server.tld.log
CustomLog ${APACHE_LOG_DIR}/access.wpseite.server.tld.log combined
<Directory /var/www/wpseite.server.tld/>
# Options Indexes FollowSymLinks MultiViews
AllowOverride all
#
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/etc/htpasswd/htpasswd"
Require valid-user
Order allow,deny
#
Allow from all
Options -MultiViews
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Require all granted
</Directory>
ServerSignature Off
SSLCertificateKeyFile /etc/ssl/private/live/privkey.pem
SSLCertificateFile /etc/ssl/private/live/cert.pem
SSLCertificateChainFile /etc/ssl/private/live/chain.pem
SetEnv nokeepalive ssl-unclean-shutdown
ServerSignature Off
</VirtualHost>
install wordpress
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
# datenbankdaten eintragen
vim wp-config.php
mysql
- mysql -u root -p
create database DATABASE;
create user 'USERNAME'@'localhost' identified by 'PASSWORD';
grant all on DATABASE.* to 'USERNAME'@'localhost';
FLUSH PRIVILEGES;