Quantcast
Viewing latest article 10
Browse Latest Browse All 16

tkldev: where to drop .htacccess or similar functionality?

Hello,

A working wordpress appliance has an .htaccess file dropped in /var/www/wordpress, which works fine. It is just a:

# BEGIN WordPress
<IfModule mod_rewrite.c>
[and so on and on.......]
</IfModule>
# END WordPress

Now, how to repeat that withinin tkldev so every new build contains that mod_rewrite snippet?

Should a file of type mod_rewrite.conf be created in
/turnkey/fab/common/overlays/apache/etc/apache2/mods-available
and the above content be just repeated there?

Putting some code into conf.d/main within wordpress produced the intended behaviour but is it the most efficient way to do so?
Here is what has been tried in conf.d/main:

touch $WPROOT/.htaccess
cat > $WPROOT/.htaccess << EOF
[here comes the code]
EOF

chown www-data:www-data $WPROOT/.htaccess

Any help will be greatly appreciated
Lin Pro

Forum: 

Viewing latest article 10
Browse Latest Browse All 16

Trending Articles