Skip to content

Instantly share code, notes, and snippets.

@haringsrob
Created December 14, 2016 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haringsrob/c5cb813ffeebb80c14816e988bed8c40 to your computer and use it in GitHub Desktop.
Save haringsrob/c5cb813ffeebb80c14816e988bed8c40 to your computer and use it in GitHub Desktop.
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
#
# Set up permissions for VirtualHosts in ~/Sites
#
<Directory "/Users/rob/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
# For http://localhost in the users' Sites folder
<VirtualHost _default_:80>
ServerName localhost
DocumentRoot "/Users/rob/Sites"
</VirtualHost>
#
# VirtualHosts
#
## Manual VirtualHost template
#<VirtualHost *:80>
# ServerName project.dev
# CustomLog "/Sites/logs/project.dev-access_log" combined
# ErrorLog "/Sites/logs/project.dev-error_log"
# DocumentRoot "/Sites/project.dev"
#</VirtualHost>
#
# Automatic VirtualHosts
# A directory at /Sites/webroot can be accessed at http://webroot.dev
# In Drupal, uncomment the line with: RewriteBase /
# This log format will display the per-virtual-host as the first field followed by a typical log line
LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedmassvhost
# Auto-VirtualHosts with .dev
<VirtualHost *:80>
ServerName dev
ServerAlias *.dev
CustomLog "/Users/rob/Sites/logs/dev-access_log" combinedmassvhost
ErrorLog "/Users/rob/Sites/logs/dev-error_log"
<Directory /Users/rob/Sites/%1/%2/%3>
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
<Directory /Users/rob/Sites/%1/%2/%3/web>
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
VirtualDocumentRoot /Users/rob/Sites/%1/%2/%3
</VirtualHost>
@haringsrob
Copy link
Author

Include /home/rob/Sites/httpd-vhost-linux.conf

in /etc/httpd/httpd.conf

@haringsrob
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment