Procházet zdrojové kódy

create a writable htaccess file

some features like permalinks rely on this
Girish Ramakrishnan před 9 roky
rodič
revize
29d9a50cb7
3 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 2 0
      Dockerfile
  2. 0 1
      apache2-wordpress.conf
  3. 2 0
      start.sh

+ 2 - 0
Dockerfile

@@ -5,6 +5,7 @@ RUN mkdir -p /app/code
 WORKDIR /app/code
 RUN curl -L http://wordpress.org/wordpress-4.4.1.tar.gz | tar -xz --strip-components 1 -f -
 RUN mv /app/code/wp-content /app/code/wp-content-vanilla && ln -s /app/data/wp-content /app/code/wp-content
+RUN ln -s /app/data/htaccess /app/code/.htaccess
 ADD wp-config.php.template /app/code/wp-config.php.template
 ADD start.sh /app/code/start.sh
 
@@ -35,6 +36,7 @@ RUN echo "Listen 8000" > /etc/apache2/ports.conf
 
 # configure mod_php
 RUN a2enmod php5
+RUN a2enmod rewrite
 RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 8M/' \
         -e 's,;session.save_path.*,session.save_path = "/run/wordpress/sessions",' \
         -i /etc/php5/apache2/php.ini

+ 0 - 1
apache2-wordpress.conf

@@ -18,7 +18,6 @@
     # some directories must be protected
    <Directory /app/code/wp-content>
         DirectoryIndex Off
-        Options -FollowSymLinks
         AllowOverride None
         <IfModule mod_php5.c>
             php_admin_flag engine off

+ 2 - 0
start.sh

@@ -98,6 +98,8 @@ EOF
 )
 $WP --autoload=true --format=json option update authLDAPOptions "${ldapConfig}"
 
+touch /app/data/htaccess
+
 chown -R www-data:www-data /app/data /run/wordpress
 
 echo "Starting apache"