Last active
August 29, 2015 14:20
-
-
Save davialexandre/bcd439770a628fe3b1bc to your computer and use it in GitHub Desktop.
tasks to install webgrind using Ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: PHP | Create the webgrind dirs | |
file: name=/var/www/webgrind/storage state=directory owner=www-data mode=0700 | |
- name: PHP | Download webgrind package | |
get_url: url=https://github.com/bionoren/webgrind/archive/xdebug23.zip dest=/tmp/webgrind.tar.gz | |
- name: PHP | Extract the webgrind package | |
unarchive: src=/tmp/webgrind.tar.gz dest=/var/www/webgrind copy=no creates=/var/www/webgrind/index.php | |
- name: PHP | Move the webgrind package contents to the webgrind dir | |
shell: mv /var/www/webgrind/webgrind-master/* /var/www/webgrind creates=/var/www/webgrind/index.php | |
- name: PHP | Remove the webgrind-master dir | |
file: path=/var/www/webgrind/webgrind-master state=absent | |
- name: PHP | Copy the webgrind vhost file | |
copy: | |
src=files/nginx/webgrind.conf | |
dest=/etc/nginx/conf.d/webgrind.conf | |
notify: | |
- Restart NGINX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 9998; | |
root /var/www/webgrind; | |
index index.php; | |
location ~ \.php(/|$) { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
} | |
location config.php { | |
return 404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment