Differences

This shows you the differences between two versions of the page.


apache_virtual_hosts [2015/06/01 21:39] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Apache Virtual Hosts ======
  
 +  * [[Apache]]
 +
 +==== Automatic Virtual Hosts ====
 +
 +The configuration for setting up the dynamic vhosts is in /etc/apache2/vhosts.d/99_magic_vhosts.conf
 +
 +<code>
 +<VirtualHost *:80>
 +        VirtualDocumentRoot "/home/steve/public_html/%1"
 +        ServerName dev.beandog.org
 +        ServerAlias *.beandog.org
 +        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
 +</VirtualHost>
 +</code>
 +
 +If you want to set permissions on a specific directory, the ''Directory'' initiative will not accept '%1', although it can use '*'.
 +
 +Using this configuration, permission to the directory will be denied by default, per Apache's default setup.  Create a ''Directory'' group to prefix the virtual hosts to allow access:
 +
 +<code>
 +<Directory "/home/steve/public_html/*">
 +        Order allow,deny
 +        Allow from all
 +</Directory>
 +</code>
 +
 +==== Virtual Hosts ====
 +
 +Other virtual hosts have configuration files in ''/etc/apache2/vhosts.d''  There is one configuration file for each virtual host.

Navigation
QR Code
QR Code apache_virtual_hosts (generated for current page)