Ajustando tamanho da requisição recebida
This commit is contained in:
parent
5f11c0b9bc
commit
ab69ff394d
2 changed files with 30 additions and 10 deletions
34
Dockerfile
34
Dockerfile
|
|
@ -5,14 +5,36 @@ FROM php:8.4-apache
|
|||
RUN apt-get update && apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libonig-dev libxml2-dev zip unzip curl git libzip-dev libfreetype6-dev libjpeg62-turbo-dev && docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install -j$(nproc) gd mbstring && docker-php-ext-install pdo pdo_mysql mysqli zip && docker-php-ext-enable opcache
|
||||
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
curl \
|
||||
git \
|
||||
libzip-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd mbstring \
|
||||
&& docker-php-ext-install pdo pdo_mysql mysqli zip \
|
||||
&& docker-php-ext-enable opcache
|
||||
|
||||
# Habilita o módulo de reescrita do Apache (útil para Laravel ou outros frameworks)
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Adiciona a diretiva ServerName globalmente
|
||||
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||
# Ajusta limites do Apache para aceitar requisições grandes
|
||||
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
|
||||
&& echo "LimitRequestBody 0" >> /etc/apache2/apache2.conf \
|
||||
&& echo "LimitRequestLine 65536" >> /etc/apache2/apache2.conf \
|
||||
&& echo "LimitRequestFieldSize 65536" >> /etc/apache2/apache2.conf
|
||||
|
||||
# Ajusta limites do PHP (upload e POST maiores)
|
||||
RUN { \
|
||||
echo "upload_max_filesize=200M"; \
|
||||
echo "post_max_size=200M"; \
|
||||
echo "memory_limit=512M"; \
|
||||
echo "max_execution_time=300"; \
|
||||
} > /usr/local/etc/php/conf.d/uploads.ini
|
||||
|
||||
# Substitui a configuração padrão do Apache para permitir .htaccess
|
||||
COPY ./apache/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
|
@ -25,7 +47,9 @@ RUN mkdir -p /var/www/html/temp \
|
|||
&& mkdir -p /var/www/html/rel
|
||||
|
||||
# Define permissões apropriadas
|
||||
RUN chown -R www-data:www-data /var/www/html && find /var/www/html -type d -exec chmod 755 {} + && find /var/www/html -type f -exec chmod 644 {} +
|
||||
RUN chown -R www-data:www-data /var/www/html \
|
||||
&& find /var/www/html -type d -exec chmod 755 {} + \
|
||||
&& find /var/www/html -type f -exec chmod 644 {} +
|
||||
|
||||
# Define o diretório de trabalho
|
||||
WORKDIR /var/www/html
|
||||
|
|
|
|||
6
vendor/action/log/log_save.php
vendored
6
vendor/action/log/log_save.php
vendored
|
|
@ -239,11 +239,7 @@ try {
|
|||
$size,
|
||||
$path
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 'On');
|
||||
}
|
||||
|
||||
/** Exclui o registro anterior sobre o banco de dados */
|
||||
$Database->Delete($clientId);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue