diff --git a/Makefile.in b/Makefile.in
index 9d38500106538515384aea6fce958b0f7722b30b..910f8f0f5ea104810af3b29fb81b04fc6de87349 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -5,7 +5,8 @@ BIN_PROGRAMS = \
 	noblogs \
 	noblogsmr \
 	on-all-blogs \
-	on-local-blogs
+	on-local-blogs \
+	php-noblogs
 
 LIB_FILES = \
 	$(wildcard lib/*.php)
diff --git a/bin/php-noblogs b/bin/php-noblogs
new file mode 100755
index 0000000000000000000000000000000000000000..be6400a96e983244ae0795f04911c801428daa8e
--- /dev/null
+++ b/bin/php-noblogs
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+exec env \
+  HTTP_HOST=noblogs.org \
+  php "$@"
diff --git a/debian/rules b/debian/rules
index 374f58b4b5e73131bda77a5cd56508415b764068..cc81dde9e0e5877be31b96120106c15af9703f55 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,9 +12,5 @@ include /usr/share/dpkg/default.mk
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-	--with-php=/opt/noblogs/bin/php-noblogs \
+	--with-php=/usr/bin/php-noblogs \
 	--with-wp-root=/opt/noblogs/www
-
-
-
-