dienste:bytecluster0002:wiki

Dies ist eine alte Version des Dokuments!


Container 'wiki'

  • 0.5 GB RAM
  • 2 Cores
  • 8 GB HDD (root-fs)
  • interne IPs
    • 10.2.0.2, fd00:10:2:0::2
  • FIXME
  • Standard-Template mit Benutzern
  1. NGINX und PHP-FPM installieren
    • sudo apt-get install php7.3 php7.3-cli php7.3-fpm php7.3-gd php7.3-xml php7.3-zip nginx
  2. Default-Konfiguration anpassen

    /etc/nginx/sites-available/default

    server {
    	listen 80 default_server;
    	listen [::]:80 default_server;
    
    	root /var/www/public_html;
    
    	# Add doku.php as index
    	index doku.php;
    
    	server_name _;
    
    	location / {
    		try_files $uri $uri/ @dokuwiki;
    	}
    
    	# Do not serve config, data and .ht*
    	# Comment during installation
    	location ~ /(data/|conf/|bin/|inc/|install.php) {
    		return 403;
    	}
    	location ~ /\.ht { deny all; }
    
    	# Maximum POST-size and Buffer
    	client_max_body_size 20M;
    	client_body_buffer_size 128K;
    
    	# Rewrite Rules
            location @dokuwiki {
    		rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last; 
                    rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last; 
                    rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last; 
                    rewrite ^/(.*) /doku.php?id=$1 last;
    	}
    
    	# pass PHP scripts to FastCGI server
    	location ~ \.php$ { 
    		try_files $uri =404; 
                    fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; 
                    fastcgi_index index.php; 
                    include fastcgi_params; 
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    	}
    }
  3. Dienste aktivieren und neustarten
    • sudo systemctl enable nginx.service php7.3-fpm.service
    • sudo systemctl restart nginx.service php7.3-fpm.service
  1. Dokuwiki-Verzeichnisse erstellen
    • sudo mkdir /var/www/{public_html,data}
  2. Dokuwiki installieren
    • nach Anleitung
      • Entpacken in das Verzeichnis /var/www/public_html
      • Datenverzeichnis nach /var/www/data (bzw. ../data)
  • dienste/bytecluster0002/wiki.1609098905.txt.gz
  • Zuletzt geändert: 27.12.2020 20:55
  • von mape2k