Metainformationen zur Seite
  •  

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
digitales:software:docker:lemp-webtrees [24.10.2023] – [How to Set Up Nginx, MariaDB, and PHP with Docker Compose] csdigitales:software:docker:lemp-webtrees [11.11.2024] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 19: Zeile 19:
         volumes:         volumes:
             - './php-files:/var/www/html'             - './php-files:/var/www/html'
 +            - './php.ini:/usr/local/etc/php/php.ini'
 +
         depends_on:         depends_on:
             - mariadb             - mariadb
Zeile 50: Zeile 52:
         environment:         environment:
             PMA_HOST: mariadb             PMA_HOST: mariadb
 +            UPLOAD_LIMIT: 100M
         depends_on:         depends_on:
             - mariadb             - mariadb
Zeile 57: Zeile 60:
  
   mysqldata:   mysqldata:
 +
 </code> </code>
 +
  
 ==== php-dockerfile ==== ==== php-dockerfile ====
Zeile 66: Zeile 71:
 # Installing dependencies for the PHP modules # Installing dependencies for the PHP modules
 RUN apt-get update && \ RUN apt-get update && \
-    apt-get install -y zip libzip-dev libpng-dev+    apt-get install -y zip libzip-dev libpng-dev php-curl php-mbstring
  
 # Installing additional PHP modules # Installing additional PHP modules
-RUN docker-php-ext-install mysqli pdo pdo_mysql gd zip mbstring curl exif fileinfo gd intl+RUN docker-php-ext-install mysqli pdo pdo_mysql gd zip mbstring curl exif intl 
  
 </code> </code>
 +
  
 ==== php-files/index.php ==== ==== php-files/index.php ====
Zeile 79: Zeile 86:
 </code> </code>
  
-<code ->+==== nginx-conf/nginx.conf ==== 
 + 
 +<code - nginx.conf> 
 +server { 
 +    listen 80 default_server; 
 +    listen [::]:80 default_server; 
 +     
 +    server_name localhost; 
 +    client_max_body_size 30m; 
 + 
 +    root /var/www/html; 
 +    index index.php index.html; 
 + 
 +    location / { 
 +        try_files $uri $uri/ /index.php?$args; 
 +    } 
 + 
 +    location ~* \.php$ { 
 +        fastcgi_pass php:9000; 
 +        include fastcgi_params; 
 +        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
 +        fastcgi_param SCRIPT_NAME $fastcgi_script_name; 
 +    } 
 +}
  
 </code> </code>
 +
 +
 +===== How to Create Nginx Virtual Host (Server Block) =====
 +
 +  * [[https://linuxiac.com/nginx-virtual-host/]]