Trying to optimise ghosts.

pull/63/head
Ivan Grynenko 8 years ago
parent bba6578aad
commit 84d97b3784
  1. 14
      group_vars/all.yml

@ -82,19 +82,19 @@ apache_mods_disabled:
- php7 - php7
apache_vhosts_ssl: [] apache_vhosts_ssl: []
apache_vhosts: apache_vhosts:
- servername: "www.{{ item.value.name }}" - servername: "www.{{ item }}"
with_dict: "{{ vhost_domains }}" with_items: "{{ vhost_domains }}"
serveralias: "{{ item.value.name }}" serveralias: "{{ item }}"
documentroot: "/var/www/html/{{ item.value.name }}" documentroot: "/var/www/html/{{ item }}"
extra_parameters: | extra_parameters: |
RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
ErrorLog "/var/log/httpd/{{ item.value.name }}_error.log" ErrorLog "/var/log/httpd/{{ item }}_error.log"
ServerSignature Off ServerSignature Off
ProxyTimeout 600 ProxyTimeout 600
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/html/{{ item.value.name }}/$1" ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/html/{{ item }}/$1"
LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedlog LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedlog
CustomLog "/var/log/httpd/{{ item.value.name }}_access.log" combinedlog CustomLog "/var/log/httpd/{{ item }}_access.log" combinedlog
<Proxy fcgi://localhost:9000> <Proxy fcgi://localhost:9000>
ProxySet timeout=600 ProxySet timeout=600
</Proxy> </Proxy>