summaryrefslogtreecommitdiff
path: root/apache
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-10-30 15:53:30 +0000
committerJonas Smedegaard <dr@jones.dk>2002-10-30 15:53:30 +0000
commite1e2510f3cc96611f1a83d5692054a5a6476b3ef (patch)
tree0c8c3824f6c6d852c810b6dac6395b7b34f459f1 /apache
parent8db4df3b64aac3524dc731f5f354edb6803636df (diff)
apache: Add vhosts.d, include.d and some example config snippets.
Diffstat (limited to 'apache')
-rw-r--r--apache/include.d/README8
-rw-r--r--apache/include.d/htfiles4
-rw-r--r--apache/include.d/index.anything3
-rw-r--r--apache/include.d/log-vhosts4
-rw-r--r--apache/vhosts.d/00Virtual17
-rw-r--r--apache/vhosts.d/0DEFAULT17
-rw-r--r--apache/vhosts.d/README15
-rw-r--r--apache/vhosts.d/admin43
-rw-r--r--apache/vhosts.d/kiosk7
-rw-r--r--apache/vhosts.d/mail13
10 files changed, 131 insertions, 0 deletions
diff --git a/apache/include.d/README b/apache/include.d/README
new file mode 100644
index 0000000..4fc9840
--- /dev/null
+++ b/apache/include.d/README
@@ -0,0 +1,8 @@
+# These are example files for misc. tweaks to Apache.
+#
+# Add this line just above "Section 3: Virtual hosts" in httpd.conf:
+#
+# Include includes.d/
+#
+# TODO:
+# * automate using CFEngine
diff --git a/apache/include.d/htfiles b/apache/include.d/htfiles
new file mode 100644
index 0000000..52c50c8
--- /dev/null
+++ b/apache/include.d/htfiles
@@ -0,0 +1,4 @@
+<Files ~ "^\.ht">
+ Order allow,deny
+ Deny from all
+</Files>
diff --git a/apache/include.d/index.anything b/apache/include.d/index.anything
new file mode 100644
index 0000000..972639b
--- /dev/null
+++ b/apache/include.d/index.anything
@@ -0,0 +1,3 @@
+<IfModule mod_dir.c>
+ DirectoryIndex index.html index.htm index.shtml index.cgi index.php home.htm
+</IfModule>
diff --git a/apache/include.d/log-vhosts b/apache/include.d/log-vhosts
new file mode 100644
index 0000000..de2ae41
--- /dev/null
+++ b/apache/include.d/log-vhosts
@@ -0,0 +1,4 @@
+LogFormat "[ %v %{%Y %m %d}t ] %h %l %u %t \"%r\" %>s %b" CustomLog
+LogFormat "[ %v %{%Y %m %d}t ] %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" CustomLog_combined
+#CustomLog "|/usr/local/bin/parselog" CustomLog
+CustomLog "|/usr/local/bin/parselog" CustomLog_combined
diff --git a/apache/vhosts.d/00Virtual b/apache/vhosts.d/00Virtual
new file mode 100644
index 0000000..9a7bf64
--- /dev/null
+++ b/apache/vhosts.d/00Virtual
@@ -0,0 +1,17 @@
+DocumentRoot /home
+
+<Directory /home/*/websites/*>
+ AllowOverride FileInfo AuthConfig Limit
+ Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+ <Limit GET POST OPTIONS PROPFIND>
+ Order allow,deny
+ Allow from all
+ </Limit>
+ <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
+ Order deny,allow
+ Deny from all
+ </Limit>
+</Directory>
+
+UseCanonicalName Off
+NameVirtualHost *
diff --git a/apache/vhosts.d/0DEFAULT b/apache/vhosts.d/0DEFAULT
new file mode 100644
index 0000000..364a825
--- /dev/null
+++ b/apache/vhosts.d/0DEFAULT
@@ -0,0 +1,17 @@
+<VirtualHost *>
+ServerName 107b.dk
+ServerAlias www
+ServerAdmin webmaster@107b.dk
+DocumentRoot /home/web/websites/107b.dk
+
+ScriptAlias /cgi-bin/ /home/web/webscripts/107b.dk/
+User web
+Group web
+</VirtualHost>
+
+<VirtualHost *>
+ServerName www.107b.dk
+RewriteEngine On
+RewriteRule / http://107b.dk/ [R]
+TransferLog /dev/null
+</VirtualHost>
diff --git a/apache/vhosts.d/README b/apache/vhosts.d/README
new file mode 100644
index 0000000..a07436e
--- /dev/null
+++ b/apache/vhosts.d/README
@@ -0,0 +1,15 @@
+# These are example files for Apache virtual hosts.
+# They need a little tweaking (at least change the domainname).
+#
+# Add this line just below "Section 3: Virtual hosts" in httpd.conf:
+#
+# Include vhosts.d/
+#
+# Some of the stuff is tied to the concept of recompiling suexec to have
+# the files located below /home instead of /var/www (this - among other
+# issues - allows for putting ftp access within a chroot and still allow
+# web designers into their websites).
+#
+# TODO:
+# * Write these as m4 scripts
+# * automate using CFEngine
diff --git a/apache/vhosts.d/admin b/apache/vhosts.d/admin
new file mode 100644
index 0000000..bf1d0cb
--- /dev/null
+++ b/apache/vhosts.d/admin
@@ -0,0 +1,43 @@
+<VirtualHost *>
+ServerName admin.107b.dk
+ServerAlias admin
+ServerAdmin webmaster@107b.dk
+DocumentRoot /home/web/websites/admin.107b.dk
+
+Alias /eskuel/ /var/www/eskuel/
+
+Alias /dav/ /var/www/dav/
+<Location /dav/>
+ AuthShadow On
+ AuthName "WebDAV"
+ AuthType Basic
+ AllowOverride None
+ Dav On
+ Options Indexes
+ Order allow,deny
+ Allow from all
+ <Limit HEAD GET POST OPTIONS PROPFIND>
+ Allow from all
+ </Limit>
+ <Limit MKCOL PUT DELETE LOCK UNLOCK COPY MOVE PROPPATCH>
+# Deny from all
+ Allow from all
+ </Limit>
+ require valid-user
+</Location>
+
+Alias /put/ /var/www/put/
+<Location /put/>
+ EnablePut On
+# EnableDelete Off
+ umask 007
+# <Limit PUT>
+ AuthShadow On
+ AuthName "http PUT"
+ AuthType Basic
+ require valid-user
+# </Limit>
+</Location>
+
+Include /etc/phpmyadmin/apache.conf
+</VirtualHost>
diff --git a/apache/vhosts.d/kiosk b/apache/vhosts.d/kiosk
new file mode 100644
index 0000000..8de507b
--- /dev/null
+++ b/apache/vhosts.d/kiosk
@@ -0,0 +1,7 @@
+<VirtualHost *>
+ServerName kiosk.107b.dk
+ServerAlias kiosk
+RewriteEngine On
+RewriteRule / http://lab.107b.dk/ [R]
+TransferLog /dev/null
+</VirtualHost>
diff --git a/apache/vhosts.d/mail b/apache/vhosts.d/mail
new file mode 100644
index 0000000..394e4ea
--- /dev/null
+++ b/apache/vhosts.d/mail
@@ -0,0 +1,13 @@
+<VirtualHost *>
+ ServerName mail.107b.dk
+ ServerAlias mail
+ ServerAdmin webmaster@107b.dk
+ DocumentRoot /home/web/websites/mail.107b.dk
+
+Include /etc/horde/apache.conf
+Include /etc/imp/apache.conf
+Include /etc/squirrelmail/apache.conf
+
+Alias /postaci/ /var/www/postaci/
+
+</VirtualHost>