Feat: move on..!
This commit is contained in:
parent
7245b12f86
commit
bf7133e92a
@ -1 +1 @@
|
||||
<?php phpinfo();>
|
||||
<?php phpinfo(); ?>
|
||||
|
17
files/userdir.conf.j2
Normal file
17
files/userdir.conf.j2
Normal file
@ -0,0 +1,17 @@
|
||||
<IfModule mod_userdir.c>
|
||||
UserDir public_html
|
||||
UserDir disabled root
|
||||
|
||||
<Directory /home/*/public_html>
|
||||
AllowOverride All
|
||||
Options MultiViews Indexes SymLinksIfOwnerMatch
|
||||
<Limit GET POST OPTIONS>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Limit>
|
||||
<LimitExcept GET POST OPTIONS>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</LimitExcept>
|
||||
</Directory>
|
||||
</IfModule>
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
vars_files:
|
||||
- vars/default.yml
|
||||
|
||||
tasks:
|
||||
- include: tasks/lamp.yml
|
||||
- include: tasks/userdir.yml
|
||||
|
||||
handlers:
|
||||
- name: Reload Apache
|
||||
service:
|
||||
name: apache2
|
||||
state: reloaded
|
||||
|
||||
- name: Restart Apache
|
||||
service:
|
||||
name: apache2
|
||||
state: restarted
|
@ -12,18 +12,18 @@
|
||||
file:
|
||||
path: "/var/www/{{ http_host }}"
|
||||
state: directory
|
||||
owner: "{{ app_user }}"
|
||||
owner: "{{ web_user }}"
|
||||
mode: '0755'
|
||||
|
||||
# - name: Set up Apache virtualhost
|
||||
# template:
|
||||
# src: "files/apache.conf.j2"
|
||||
# dest: "/etc/apache2/sites-available/{{ http_conf }}"
|
||||
# notify: Reload Apache
|
||||
- name: Set up Apache virtualhost
|
||||
template:
|
||||
src: "files/apache.conf.j2"
|
||||
dest: "/etc/apache2/sites-available/{{ http_conf }}"
|
||||
notify: Reload Apache
|
||||
|
||||
# - name: Enable new site
|
||||
# shell: /usr/sbin/a2ensite {{ http_conf }}
|
||||
# notify: Reload Apache
|
||||
- name: Enable new site
|
||||
shell: /usr/sbin/a2ensite {{ http_conf }}
|
||||
notify: Reload Apache
|
||||
|
||||
- name: Disable default Apache site
|
||||
shell: /usr/sbin/a2dissite 000-default.conf
|
||||
|
11
tasks/userdir.yml
Normal file
11
tasks/userdir.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Enable userdir
|
||||
shell: /usr/sbin/a2mod userdir
|
||||
notify: Reload Apache
|
||||
|
||||
- name: Set up userdir virtualhost
|
||||
template:
|
||||
src: "files/userdir.conf.j2"
|
||||
dest: "/etc/apache2/mods-enabled/userdir.conf"
|
||||
notify: Reload Apache
|
||||
|
7
vars/default.yml
Normal file
7
vars/default.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
mysql_root_password: "mysql_root_password"
|
||||
web_user: "www-data"
|
||||
http_host: ""
|
||||
http_conf: "root.conf"
|
||||
http_port: "80"
|
||||
disable_default: true
|
Loading…
Reference in New Issue
Block a user