Restore from Gitea ZIP snapshot (12.08.2026) after full instance reinstall
Git history was lost when the previous Gitea instance was wiped and reinstalled due to an unresolved corruption bug — this commit is the last known-good file content, exported before the reinstall. Prior commit history is not recoverable through this path.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Restart Apache
|
||||
ansible.builtin.systemd:
|
||||
name: apache2
|
||||
state: restarted
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
- name: Update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Install Apache
|
||||
ansible.builtin.apt:
|
||||
name: apache2
|
||||
state: present
|
||||
|
||||
- name: Enable mod_rewrite
|
||||
ansible.builtin.command:
|
||||
cmd: a2enmod rewrite
|
||||
creates: /etc/apache2/mods-enabled/rewrite.load
|
||||
notify: Restart Apache
|
||||
|
||||
- name: Create website root directory
|
||||
ansible.builtin.file:
|
||||
path: "/var/www/{{ domain_name }}"
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
mode: '0755'
|
||||
|
||||
- name: Configure virtual host
|
||||
ansible.builtin.template:
|
||||
src: vhost.conf.j2
|
||||
dest: "/etc/apache2/sites-available/{{ domain_name }}.conf"
|
||||
mode: '0644'
|
||||
notify: Restart Apache
|
||||
|
||||
- name: Enable virtual host
|
||||
ansible.builtin.command:
|
||||
cmd: "a2ensite {{ domain_name }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ domain_name }}.conf"
|
||||
notify: Restart Apache
|
||||
|
||||
- name: Disable default site
|
||||
ansible.builtin.command:
|
||||
cmd: a2dissite 000-default.conf
|
||||
ignore_errors: yes
|
||||
notify: Restart Apache
|
||||
|
||||
- name: Start and enable Apache
|
||||
ansible.builtin.systemd:
|
||||
name: apache2
|
||||
state: started
|
||||
enabled: yes
|
||||
@@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ domain_name }}
|
||||
DocumentRoot /var/www/{{ domain_name }}
|
||||
|
||||
<Directory /var/www/{{ domain_name }}>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user