diff --git a/Dockerfile b/Dockerfile
index 81048ff..21cbc46 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,7 +28,6 @@ RUN ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy
COPY apache2.conf /etc/apache2/apache2.conf
COPY ports.conf /etc/apache2/ports.conf
-
WORKDIR /root/src
### openjpeg version in ubuntu 14.04 is 1.3, too old and does not have openslide required chroma subsampled images support. download 2.1.0 from source and build
@@ -67,6 +66,16 @@ RUN cp /root/src/iipsrv/src/iipsrv.fcgi /var/www/localhost/fcgi-bin/
#COPY apache2-iipsrv-fcgid.conf /root/src/iip-openslide-docker/apache2-iipsrv-fcgid.conf
+RUN chgrp -R 0 /root && \
+ chmod -R g+rwX /root
+RUN chgrp -R 0 /var && \
+ chmod -R g+rwX /var
+RUN chgrp -R 0 /run && \
+ chmod -R g+rwX /run
+RUN chgrp -R 0 /etc/apache2 && \
+ chmod -R g+rwX /etc/apache2
+
+USER 1001
-#CMD service apache2 start && while true; do sleep 1000; done
+# CMD service apache2 start && while true; do sleep 1000; done
CMD apachectl -D FOREGROUND
diff --git a/apache2.conf b/apache2.conf
index 9f327a7..e08e127 100644
--- a/apache2.conf
+++ b/apache2.conf
@@ -72,7 +72,7 @@ ServerName localhost
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
-Mutex file:${APACHE_LOCK_DIR} default
+Mutex file:/var/log default
#
# PidFile: The file in which the server should record its process
diff --git a/ports.conf b/ports.conf
index a733681..ec84a57 100644
--- a/ports.conf
+++ b/ports.conf
@@ -1,9 +1,9 @@
-Listen 80
+Listen 8080
- Listen 443
+ Listen 8443
- Listen 443
+ Listen 8443