4
This commit is contained in:
@@ -1,13 +1,9 @@
|
|||||||
FROM webdevops/php-nginx:8.2-alpine
|
FROM webdevops/php-nginx:8.2-alpine
|
||||||
|
|
||||||
ENV WEB_DOCUMENT_ROOT=/app
|
ENV WEB_DOCUMENT_ROOT=/app
|
||||||
|
|
||||||
COPY ["Profice WebSite/", "/app/"]
|
COPY ["Profice WebSite/", "/app/"]
|
||||||
|
|
||||||
RUN echo 'location / { \
|
COPY vhost.conf /opt/docker/etc/nginx/vhost.common.d/10-location-root.conf
|
||||||
try_files $uri $uri/ $uri.html /index.php?$query_string; \
|
|
||||||
index index.html index.php; \
|
|
||||||
}' > /opt/docker/etc/nginx/vhost.common.d/10-location-root.conf
|
|
||||||
|
|
||||||
RUN chown -R application:application /app && chmod -R 755 /app
|
RUN chown -R application:application /app && chmod -R 755 /app
|
||||||
|
|
||||||
|
|||||||
15
vhost.conf
Normal file
15
vhost.conf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
index index.html index.php;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
if ($request_uri ~ ^/index(\.html)?$) {
|
||||||
|
return 301 /;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request_uri ~ ^/(.*)\.html$) {
|
||||||
|
return 301 /$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try_files $uri $uri/ $uri.html /sites$uri /sites$uri.html /index.php?$query_string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user