forked from iloveitaly/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache.conf
85 lines (66 loc) · 2.16 KB
/
apache.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Without explicit ServerName you'll get bind errors depending on your network config
ServerName 127.0.0.1
# global configuration options
Listen 80
PassEnv USER
PassEnv RAILS_TEST_SERVER_PORT
User ${USER}
Group staff
# http://httpd.apache.org/docs/2.2/mod/mod_log_config.html
LogLevel info
LogFormat "\"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" simple-apache
ErrorLog "/Users/${USER}/Sites/logs/error_log"
CustomLog "/Users/${USER}/Sites/logs/access_log" simple-apache
# Load mod_rewrite; used heavily in WordPress
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
# Setup php here; it isn't loaded by default in Yosemite
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
# apache 2.4 needs "Require all granted"
<Directory />
AllowOverride all
Require all granted
</Directory>
<Directory "/Users/${USER}/Sites/">
Options Indexes MultiViews
Options +Includes +FollowSymlinks +Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Users/${USER}/Sites"
</VirtualHost>
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
# http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html
# access your WP sites at thedomain.wp.dev (assumes that it's located at ~/Sites/thedomain.com)
<VirtualHost *:80>
ServerName vhosts
ServerAlias *.wp.dev *.xip.io
UseCanonicalName Off
VirtualDocumentRoot /Users/${USER}/Sites/%1.0.com
</VirtualHost>
ProxyTimeout 240
# https://github.com/basecamp/pow/wiki/Running-Pow-with-Apache
<VirtualHost *:80>
ServerName pow
ServerAlias *.dev
# 20559 is the port that pow is running on
ProxyPass / http://127.0.0.1:20559/
ProxyPassReverse / http://127.0.0.1:20559/
ProxyPreserveHost On
</VirtualHost>
<VirtualHost *:80>
ServerName powtest
ServerAlias *.test
ProxyPass / http://127.0.0.1:${RAILS_TEST_SERVER_PORT}/
ProxyPassReverse / http://127.0.0.1:${RAILS_TEST_SERVER_PORT}/
ProxyPreserveHost On
</VirtualHost>