Commit 7307d6f8 authored by Jonathan Blum's avatar Jonathan Blum

generate vhost for apache

parent be6fd98e
......@@ -4,7 +4,7 @@
user:
name: "{{ privatebin_user }}"
comment: "PrivateBin User"
groups: www-data
groups: "{{ apache_user }}"
append: yes
- name: PRIVATEBIN | INSTALL | Clone PrivateBin repository
......@@ -12,3 +12,11 @@
repo: 'https://github.com/PrivateBin/PrivateBin.git'
dest: "{{ privatebin_install_path }}"
version: "{{ privatebin_version }}"
- name: PRIVATEBIN | INSTALL | Generate Apache vhost template
template:
src: vhost-apache.j2
dest: "{{ apache_dir }}/sites-available/privatebin.conf
owner: "{{ apache_user }}"
group: "{{ apache_user }}"
mode: 0640
---
- name: PRIVATEBINN | PHP | Install Depedencies
- name: PRIVATEBIN | PHP | Check PHP Version
command: "{{ php_executable }} --version"
register: php_version
changed_when: False
failed_when: False
- name: PRIVATEBIN | PHP | Install Depedencies
package:
name:
- php-mcrypt
......
<VirtualHost *:80>
ServerName YOUR_SERVER_IP
DocumentRoot {{ privatein_install_path }}
ErrorLog ${APACHE_LOG_DIR}/privatebin-error.log
CustomLog ${APACHE_LOG_DIR}/privatebin-access.log combined
<Directory {{ privatebin_install_path }}>
AllowOverride All
</Directory>
</VirtualHost>
---
# vars file for itopie.privatebin
php_executable: /usr/bin/php
apache_dir: /etc/apache2
apache_user: www-data
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment