You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.5 KiB

# This is our main site
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
AllowOverride None
Order allow,deny
Allow from all
AllowOverride none
Require valid-user
AuthName "This is to prevent Google from indexing the sites."
AuthType Basic
AuthUserFile /var/www/htpasswd
Require valid-user
Order allow,deny
</Directory>
</VirtualHost>
# This makes subdomains from subdirectories
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName *.example.com
VirtualDocumentRoot /var/www/%1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
AuthName "This is to prevent Google from indexing the sites."
AuthType Basic
AuthUserFile /var/www/htpasswd
Require valid-user
# e.g. Screencast is a Java Applet and doesn't use the browser authentication
# so allow the needed AJAX endpoint without authentication
SetEnvIfNoCase Request_URI ".*tiki-ajax_services.php.*" NOPASSWD=true
Satisfy Any
Allow from env=NOPASSWD
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/sub.example.com-error.log
CustomLog ${APACHE_LOG_DIR}/sub.example.com-access.log combined
</VirtualHost>