Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
dienste:bytecluster0002:wordpress [05.10.2020 23:34] – [Container setup] chaos | dienste:bytecluster0002:wordpress [19.07.2023 19:13] (aktuell) – mape2k | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Proxmox container ' | + | ====== Proxmox container ' |
===== Status ===== | ===== Status ===== | ||
- | * testing ... | + | * up and running as http:// |
+ | * has problems with loopback device cause the server can't reach itself with the external URL | ||
===== Container setup ===== | ===== Container setup ===== | ||
Zeile 18: | Zeile 19: | ||
===== Ansible Script ===== | ===== Ansible Script ===== | ||
< | < | ||
+ | # | ||
+ | - name: ' | ||
+ | hosts: wordpress | ||
+ | become: true | ||
+ | |||
+ | tasks: | ||
+ | - name: remove apache2 | ||
+ | apt: | ||
+ | name: apache2 | ||
+ | state: absent | ||
+ | |||
+ | - name: install packages | ||
+ | apt: | ||
+ | pkg: | ||
+ | - php7.3 | ||
+ | - php7.3-xml | ||
+ | - php7.3-mbstring | ||
+ | - php7.3-zip | ||
+ | - php7.3-mysql | ||
+ | - php7.3-imagick | ||
+ | - php7.3-curl | ||
+ | - php7.3-fpm | ||
+ | - nginx | ||
+ | |||
+ | - name: Remove default nginx demo site | ||
+ | file: | ||
+ | path: / | ||
+ | state: absent | ||
+ | |||
+ | - name: check if nextcloud is already installed | ||
+ | stat: | ||
+ | path: / | ||
+ | register: wordpress_exists | ||
+ | |||
+ | - name: Download wordpress and unpack | ||
+ | unarchive: | ||
+ | src: https:// | ||
+ | dest: /var/www | ||
+ | owner: www-data | ||
+ | group: www-data | ||
+ | remote_src: yes | ||
+ | when: not wordpress_exists.stat.exists | ||
+ | |||
+ | - name: Remove file packed file | ||
+ | file: | ||
+ | path: / | ||
+ | state: absent | ||
+ | |||
+ | - name: copy wordpress config | ||
+ | copy: | ||
+ | src: ./ | ||
+ | dest: / | ||
+ | owner: www-data | ||
+ | group: www-data | ||
+ | mode: ' | ||
+ | |||
+ | - name: Download wp-cli wordpress command line interface | ||
+ | get_url: | ||
+ | url: https:// | ||
+ | dest: / | ||
+ | mode: ' | ||
+ | |||
+ | - name: finish installation | ||
+ | become_user: | ||
+ | become: yes | ||
+ | shell: | | ||
+ | wp core install --url=' | ||
+ | args: | ||
+ | chdir: / | ||
+ | |||
+ | - name: copy nginx config | ||
+ | copy: | ||
+ | src: ./ | ||
+ | dest: / | ||
+ | owner: root | ||
+ | group: root | ||
+ | mode: ' | ||
+ | |||
+ | - name: Create a symbolic link | ||
+ | file: | ||
+ | src: / | ||
+ | dest: / | ||
+ | owner: root | ||
+ | group: root | ||
+ | state: link | ||
+ | |||
+ | - name: load php-fpm | ||
+ | systemd: | ||
+ | state: restarted | ||
+ | name: php7.3-fpm | ||
+ | |||
+ | - name: Restart nginx | ||
+ | systemd: | ||
+ | state: restarted | ||
+ | daemon_reload: | ||
+ | name: nginx | ||
</ | </ | ||
Zeile 24: | Zeile 121: | ||
==== Notizen ==== | ==== Notizen ==== | ||
- | | + | ===== wp-config.php ===== |
+ | * liegt unter /// | ||
+ | < | ||
+ | <?php | ||
+ | /** | ||
+ | * The base configuration for WordPress | ||
+ | * | ||
+ | * The wp-config.php creation script uses this file during the | ||
+ | * installation. You don't have to use the web site, you can | ||
+ | * copy this file to " | ||
+ | * | ||
+ | * This file contains the following configurations: | ||
+ | * | ||
+ | * * MySQL settings | ||
+ | * * Secret keys | ||
+ | * * Database table prefix | ||
+ | * * ABSPATH | ||
+ | * | ||
+ | * @link https:// | ||
+ | * | ||
+ | * @package WordPress | ||
+ | */ | ||
+ | |||
+ | // ** MySQL settings - You can get this info from your web host ** // | ||
+ | /** The name of the database for WordPress */ | ||
+ | define( ' | ||
+ | |||
+ | /** MySQL database username */ | ||
+ | define( ' | ||
+ | |||
+ | /** MySQL database password */ | ||
+ | define( ' | ||
+ | |||
+ | /** MySQL hostname */ | ||
+ | define( ' | ||
+ | |||
+ | /** Database Charset to use in creating database tables. */ | ||
+ | define( ' | ||
+ | |||
+ | /** The Database Collate type. Don't change this if in doubt. */ | ||
+ | define( ' | ||
+ | |||
+ | /**#@+ | ||
+ | * Authentication Unique Keys and Salts. | ||
+ | * | ||
+ | * Change these to different unique phrases! | ||
+ | * You can generate these using the {@link https:// | ||
+ | * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. | ||
+ | * | ||
+ | * @since 2.6.0 | ||
+ | */ | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | define(' | ||
+ | |||
+ | /**#@-*/ | ||
+ | |||
+ | /** | ||
+ | * WordPress Database Table prefix. | ||
+ | * | ||
+ | * You can have multiple installations in one database if you give each | ||
+ | * a unique prefix. Only numbers, letters, and underscores please! | ||
+ | */ | ||
+ | $table_prefix = ' | ||
+ | |||
+ | /** | ||
+ | * For developers: WordPress debugging mode. | ||
+ | * | ||
+ | * Change this to true to enable the display of notices during development. | ||
+ | * It is strongly recommended that plugin and theme developers use WP_DEBUG | ||
+ | * in their development environments. | ||
+ | * | ||
+ | * For information on other constants that can be used for debugging, | ||
+ | * visit the documentation. | ||
+ | * | ||
+ | * @link https:// | ||
+ | */ | ||
+ | define( ' | ||
+ | |||
+ | /* That's all, stop editing! Happy publishing. */ | ||
+ | |||
+ | /** Absolute path to the WordPress directory. */ | ||
+ | if ( ! defined( ' | ||
+ | define( ' | ||
+ | } | ||
+ | |||
+ | /** Sets up WordPress vars and included files. */ | ||
+ | require_once ABSPATH . ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== NGINX Config ===== | ||
+ | < | ||
+ | server { | ||
+ | listen 8086; | ||
+ | listen [:: | ||
+ | root / | ||
+ | index index.php index.html index.htm; | ||
+ | server_name bytecluster0002.bytespeicher.org; | ||
+ | |||
+ | error_log / | ||
+ | access_log / | ||
+ | |||
+ | client_max_body_size 100M; | ||
+ | location / { | ||
+ | try_files $uri $uri/ / | ||
+ | } | ||
+ | location ~ \.php$ { | ||
+ | include snippets/ | ||
+ | fastcgi_pass unix:/ | ||
+ | fastcgi_param | ||
+ | } | ||
+ | } | ||
+ | </ |