Advertisement
freephile

mod_vhost_alias

Sep 21st, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <VirtualHost *:80>
  2.   # get the server name from the Host: header
  3.   UseCanonicalName Off
  4.   ## insert a dummy name
  5.   ServerName catchall.host
  6.   # ServerName wiki.example.com
  7.   ServerAlias *.*.*
  8.   # ServerAlias *.*
  9.  
  10.   # this log format can be split per-virtual-host based on the first field
  11.   # using the split-logfile utility.
  12.   LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
  13.   CustomLog "${APACHE_LOG_DIR}/access.log" vcommon
  14.  
  15.   # 0     the whole requested host name 'foo.acme.com' if that was the requested domain
  16.   # -2  the penultimate part 'acme' of foo.acme.com
  17.   VirtualDocumentRoot "/var/www/clients/%-2/%0/w"
  18.   VirtualScriptAlias  "/var/www/clients/%-2/%0/cgi-bin"
  19.   # DocumentRoot "/var/www/clients/example.com/wiki.example.com/w"
  20.  
  21.   <Directory "/var/www/clients/*/*/w">
  22.     Require all granted
  23.     Options Indexes FollowSymlinks
  24.     AllowOverride All
  25.   </Directory>
  26. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement