Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚚 Enable mod_rewrite and simplify Apache config #695

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ RUN composer install --no-scripts && \
FROM docker.io/php:8.2-apache-bookworm

RUN apt-get update && \
apt-get install -y libpng-dev libsodium-dev libsqlite3-dev libzip-dev zlib1g-dev zip
RUN docker-php-ext-install -j$(nproc) gd opcache pdo_mysql pdo_sqlite sodium zip
RUN echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory_limit.ini
apt-get install -y libpng-dev libsodium-dev libsqlite3-dev libzip-dev zlib1g-dev zip && \
a2enmod rewrite && \
docker-php-ext-install -j$(nproc) gd opcache pdo_mysql pdo_sqlite sodium zip && \
echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory_limit.ini

COPY --from=builder /var/www/html /var/www/html
COPY contrib/apache.conf /etc/apache2/sites-available/000-default.conf
29 changes: 1 addition & 28 deletions contrib/apache.conf
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
<VirtualHost *:80>

DocumentRoot /var/www/html/public

<Directory /var/www/html/public>
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,SymLinksIfOwnerMatch,MultiViews
Options -Indexes -MultiViews +SymLinksIfOwnerMatch

LimitRequestBody 10485760

</Directory>

<Directory /var/www/html/public/.well-known>
Require all granted
AllowOverride All
</Directory>

SetEnv APP_ENV dev

<IfModule fcgid_module>
AddHandler fcgid-script .php
FCGIWrapper /var/www/users.example.org/php-fcgi/php-fcgi-starter .php

IPCConnectTimeout 20
IPCCommTimeout 60
FcgidBusyTimeout 60
MaxRequestLen 10485760

<Directory /var/www/html/public>
Options +ExecCGI
</Directory>
</IfModule>

ErrorLog "|/usr/bin/logger -t apache -p local0.error"

Protocols h2 http/1.1
</VirtualHost>
Loading