27122025
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,15 +1,18 @@
|
|||||||
FROM php:8.2-fpm-alpine
|
FROM php:8.2-apache
|
||||||
|
|
||||||
RUN apk add --no-cache nginx
|
# Enable Apache rewrite module (optional but recommended)
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
# Allow .htaccess overrides (even if you don't use it now)
|
||||||
|
RUN sed -ri 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
# Copy your app
|
||||||
COPY . /var/www/html
|
COPY . /var/www/html
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
# Permissions
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
RUN mkdir -p /run/nginx
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["sh", "-c", "php-fpm -D && nginx -g 'daemon off;'"]
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<head>
|
<head>
|
||||||
|
<base href="/">
|
||||||
<title>Tenext</title>
|
<title>Tenext</title>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name="robots" content="Tenext, technologies,mobile applications,enterprise app;ications">
|
<meta name="robots" content="Tenext, technologies,mobile applications,enterprise app;ications">
|
||||||
|
|||||||
32
nginx.conf
32
nginx.conf
@@ -1,32 +0,0 @@
|
|||||||
events {}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
root /var/www/html;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
# 1️⃣ Serve static files directly
|
|
||||||
location ~* \.(css|js|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf)$ {
|
|
||||||
try_files $uri =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 2️⃣ ALL routes → index.php
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 3️⃣ PHP execution
|
|
||||||
location ~ \.php$ {
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_pass 127.0.0.1:9000;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user