devilbox/etc/apache-2.4/01-vhost-default.conf

58 lines
1.4 KiB
Plaintext
Raw Normal View History

2016-10-09 16:47:49 +00:00
##
## Default Host for http://localhost
##
<VirtualHost _default_:80>
ServerName localhost
ServerAdmin root@localhost
ErrorLog /var/log/apache-2.4/localhost-error.log
CustomLog /var/log/apache-2.4/localhost-access.log combined
DirectoryIndex index.php index.html
#RewriteEngine On
#RewriteRule ^/(.*\.php(/.*)?)$ fcgi://172.16.238.11:9000/var/www/default/htdocs/$1 [P]
# enablereuse
# Defining a worker will improve performance
# And in this case, re-use the worker (dependent on support from the fcgi application)
# If you have enough idle workers, this would only improve the performance marginally
#
# enablereuse requires Apache 2.4.11 or later
#<Proxy "fcgi://172.16.238.11:9000/" enablereuse=on max=10></Proxy>
<FilesMatch "\.php$">
Require all granted
# Pick one of the following approaches
# Use the standard TCP socket
SetHandler "proxy:fcgi://172.16.238.11:9000"
# If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket
#SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/:9000"
</FilesMatch>
DocumentRoot "/var/www/default/htdocs"
<Directory "/var/www/default/htdocs">
DirectoryIndex index.php index.html
AllowOverride All
Options All
RewriteEngine on
RewriteBase /
Order allow,deny
Allow from all
# Apache 2.4
Require all granted
</Directory>
</VirtualHost>