]> git.donarmstrong.com Git - lilypond.git/commitdiff
Web build: separate htaccess files, add to security process.
authorGraham Percival <graham@percival-music.ca>
Sun, 14 Mar 2010 18:03:53 +0000 (18:03 +0000)
committerGraham Percival <graham@percival-music.ca>
Sun, 14 Mar 2010 18:27:58 +0000 (18:27 +0000)
Documentation/contributor/website-work.itexi
Documentation/web/server/lilypond.org.htaccess
Documentation/web/server/website-dir.htaccess [new file with mode: 0644]
website.make

index 14b6b301b02ed84842fcbe4ea3b880c797dadb22..7e570aca85896bb7f1d3486c118601a5a4d813ba 100644 (file)
@@ -67,7 +67,7 @@ git fetch origin
 git merge origin/master
 @end verbatim
 
-Check for any updates to trusted scripts:
+Check for any updates to trusted scripts / files:
 
 @verbatim
 ### check-git.sh
@@ -81,6 +81,8 @@ diff -u $DEST/create-version-itexi.py $GIT/scripts/build/create-version-itexi.py
 diff -u $DEST/create-weblinks-itexi.py $GIT/scripts/build/create-weblinks-itexi.py
 diff -u $DEST/mass-link.py $GIT/scripts/build/mass-link.py
 diff -u $DEST/website_post.py $GIT/scripts/build/website_post.py
+diff -u $DEST/lilypond.org.htaccess $GIT/Documentation/web/server/lilypond.org.htaccess
+diff -u $DEST/website-dir.htaccess $GIT/Documentation/web/server/website-dir.htaccess
 @end verbatim
 
 If the changes look ok, make them trusted:
@@ -97,6 +99,8 @@ cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
 cp $GIT/scripts/build/create-weblinks-itexi.py $DEST/create-weblinks-itexi.py
 cp $GIT/scripts/build/mass-link.py $DEST/mass-link.py
 cp $GIT/scripts/build/website_post.py $DEST/website_post.py
+cp $GIT/Documentation/web/server/lilypond.org.htaccess $DEST/lilypond.org.htaccess
+cp $GIT/Documentation/web/server/website-dir.htaccess $DEST/website-dir.htaccess
 @end verbatim
 
 Build the website:
@@ -104,13 +108,14 @@ Build the website:
 @verbatim
 ### make-website.sh
 #!/bin/sh
-DEST=$HOME/public_html/
+DEST=$HOME/web/
 cd $HOME/src/build-website
 cp $HOME/lilypond/trusted-scripts/website.make .
 
 make -f website.make WEBSITE_ONLY_BUILD=1 website
 rsync -ra $HOME/src/build-website/out-website/website/ $DEST/website/
 cp $HOME/src/build-website/out-website/pictures $DEST
+cp $HOME/src/build-website/out-website/.htaccess $DEST
 @end verbatim
 
 Cronjob to automate the trusted portions:
index 914374085559281cecc6d943212d889c5f058500..3052dc04de2bd9c685b5c66b8ad9f3b69a635502 100644 (file)
@@ -1,3 +1,5 @@
+# htaccess for root dir of lilypond.org
+
 RewriteEngine On
 
 # Deny following of symlinks by robots.
diff --git a/Documentation/web/server/website-dir.htaccess b/Documentation/web/server/website-dir.htaccess
new file mode 100644 (file)
index 0000000..21e3aad
--- /dev/null
@@ -0,0 +1,2 @@
+# htaccess for /website/ dir of lilypond.org
+DirectoryIndex index
index f6da80dea453da8fbfe6e51502282b33f5635c75..b03012d15113382050afb9f5fa76f22c3e3b6e4d 100644 (file)
@@ -11,6 +11,8 @@ ifeq ($(WEBSITE_ONLY_BUILD),1)
   trusted-dir=$(HOME)/lilypond/trusted-scripts
   script-dir=$(trusted-dir)
   texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
+  top-htaccess=$(trusted-dir)/lilypond.org.htaccess
+  dir-htaccess=$(trusted-dir)/website-dir.htaccess
   TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
   EXAMPLES=$(HOME)/media/ly-examples/
   PICTURES=$(HOME)/media/pictures
@@ -18,6 +20,8 @@ else
   ### for normal git
   script-dir=$(top-src-dir)/scripts/build/
   texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+  top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess
+  dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess
   include $(config_make)
   # I assume this is run from top-build-dir
   EXAMPLES=Documentation/web/ly-examples/out-www/
@@ -130,7 +134,8 @@ web-post:
 
 website: website-texinfo website-css website-pictures website-examples web-post
        cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
-       cp $(SERVER_FILES)/lilypond.org.htaccess $(OUT)/website/.htaccess
        cp $(SERVER_FILES)/robots.txt $(OUT)/website/
+       cp $(top-htaccess) $(OUT)/.htaccess
+       cp $(dir-htaccess) $(OUT)/website/.htaccess