Repository navigation
Expand file tree
/
Copy path000-default.conf
More file actions
62 lines (51 loc) · 1.82 KB
/
Copy path000-default.conf
File metadata and controls
62 lines (51 loc) · 1.82 KB
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
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/www-data
# config according to http://serverfault.com/a/565936/182262 dated 2014-01-08
<Directory /var/www/www-data>
Options -Indexes +FollowSymLinks -ExecCGI +MultiViews
AllowOverride All
<IfModule mod_proxy_fcgi.c>
RewriteEngine On
RewriteBase /
RewriteOptions InheritBefore
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^([^\.]+\.php)$ fcgi://127.0.0.1:9126/var/www/www-data/$1 [L,P]
# not working yet. probably available in apache 2.5 ...
# RewriteRule ^([^\.]+\.php)$ unix:/path/to/socket.sock [L,P]
</IfModule>
Order allow,deny
allow from all
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
LogFormat "{ \
\"host\":\"${SUNSET_GROUP}\", \
\"path\":\"/var/log/httpd/logstash_access_log\", \
\"tags\":[\"ap_acc\"], \
\"message\": \"%h %l %u %t \\\"%r\\\" %>s %b\", \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
\"useragent\": \"%{User-agent}i\", \
\"clientip\": \"%{X-Forwarded-For}i\", \
\"duration\": %D, \
\"status\": %s, \
\"request\": \"%U%q\", \
\"urlpath\": \"%U\", \
\"urlquery\": \"%q\", \
\"method\": \"%m\", \
\"bytes\": %B, \
\"vhost\": \"%v\" \
}" logstash_apache_json
CustomLog "|/usr/bin/logger -thttpd -plocal7.info" logstash_apache_json
ErrorLogFormat "{ \
\"host\":\"${SUNSET_GROUP}\", \
\"path\":\"/var/log/httpd/logstash_access_log\", \
\"tags\":[\"ap_err\"], \
\"message\": \"%M\", \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
\"vhost\": \"%v\" \
}"
ErrorLog "|/usr/bin/logger -thttpd -plocal7.info"
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet