Skip to content
Snippets Groups Projects

Resolve "/wp-admin redirects to :8080"

Merged Maarten de Waard requested to merge 117-wp-admin-redirects-to-8080 into main
Compare and Show latest version
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
+ 3
4
@@ -23,8 +23,9 @@ ENV PORT 8080
ENV TLS_PORT 8443
ENV TRUSTED_PROXY_IP 10.0.0.0/8
RUN sed -i "s/\<\*:80\>/*/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
RUN sed -i "s/\<\*:443\>/*/g" /etc/apache2/sites-available/default-ssl.conf /etc/apache2/ports.conf
RUN sed -i "s/\<:80\>/:$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
RUN sed -i "s/#ServerName www.example.com/ServerName https:\/\/localhost:80/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
RUN sed -i "s/\<:443\>/:$TLS_PORT/g" /etc/apache2/sites-available/default-ssl.conf /etc/apache2/ports.conf
RUN sed "s/\tCustomLog \${APACHE_LOG_DIR}\/access.log combined/\tCustomLog \${APACHE_LOG_DIR}\/access.log remoteip/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
RUN echo "RemoteIPTrustedProxy $TRUSTED_PROXY_IP" >> /etc/apache2/apache2.conf
@@ -34,5 +35,3 @@ RUN echo "LogFormat \"%a %l %u %t \\\"%r\\\" %>s %O\" remoteip" >> /etc/apache2/
# Make sure there is no new request for directories, because those lead to
# redirects to the wrong port
# RUN echo "DirectorySlash Off" >> /etc/apache2/apache2.conf
RUN echo "ServerName https://localhost:80" >> /etc/apache2/apache2.conf
Loading