dienste:bytecluster0002:wordpress-technikkultur

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
dienste:bytecluster0002:wordpress-technikkultur [29.12.2020 16:13] mape2kdienste:bytecluster0002:wordpress-technikkultur [05.08.2023 14:38] (aktuell) – Upgrade PHP 8.2 mape2k
Zeile 23: Zeile 23:
  
   - NGINX und PHP-FPM installieren   - 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 php7.3-mbstring php7.3-mysql php7.3-imagick php7.3-curl nginx**+    * **sudo apt-get install php8.2 php8.2-cli php8.2-fpm php8.2-gd php8.2-xml php8.2-zip php8.2-mbstring php8.2-mysql php8.2-imagick php8.2-curl nginx**
   - Default-Konfiguration anpassen<file|/etc/nginx/sites-available/default>   - Default-Konfiguration anpassen<file|/etc/nginx/sites-available/default>
 server { server {
Zeile 35: Zeile 35:
  
  server_name _;  server_name _;
 +
 + # Maximum POST-size and Buffer
 + client_max_body_size 20M;
 + client_body_buffer_size 128K;
  
  location = /favicon.ico {  location = /favicon.ico {
Zeile 58: Zeile 62:
  include fastcgi_params;  include fastcgi_params;
  fastcgi_intercept_errors on;  fastcgi_intercept_errors on;
- fastcgi_pass unix:/run/php/php7.3-fpm.sock;+ fastcgi_pass unix:/run/php/php8.2-fpm.sock;
  #The following parameter can be also included in fastcgi_params file  #The following parameter can be also included in fastcgi_params file
  fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;  fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
Zeile 69: Zeile 73:
 } }
 </file>  </file> 
 +  - PHP-Konfiguration für Upload anpassen<file|/etc/php/8.2/fpm/conf.d/99-local.ini>
 +post_max_size = 20M
 +upload_max_filesize = 20M
 +</file>
   - Dienste aktivieren und neustarten   - Dienste aktivieren und neustarten
-    * **sudo systemctl enable nginx.service php7.3-fpm.service** +    * **sudo systemctl enable nginx.service php8.2-fpm.service** 
-    * **sudo systemctl restart nginx.service php7.3-fpm.service**+    * **sudo systemctl restart nginx.service php8.2-fpm.service**
  
 ==== Wordpress ==== ==== Wordpress ====
Zeile 119: Zeile 127:
 if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
  $_SERVER['HTTPS'] = 'on';  $_SERVER['HTTPS'] = 'on';
 +}
 +
 +/* Use X-Forwarded-For HTTP Header to get visitors Real IP Address */
 +if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
 +  $http_x_headers = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
 +  $_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
 } }
  
  • dienste/bytecluster0002/wordpress-technikkultur.1609254785.txt.gz
  • Zuletzt geändert: 29.12.2020 16:13
  • von mape2k