Verified Commit 6747d718 authored by Tharyrok's avatar Tharyrok
Browse files

Add openvpn config website

parent 12f16485
......@@ -11,6 +11,26 @@ server {
return 204 '';
}
location ^~ /openvpn {
alias /home/vagrant/src/backend/openvpn/public;
try_files $uri $uri/ @openvpn;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-openvpn-api-ketupa-neutrinet-me.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
fastcgi_read_timeout 900;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
}
location @openvpn {
rewrite /openvpn/(.*)$ /openvpn/index.php?$1 last;
}
location ^~ /certificates {
alias /home/vagrant/src/backend/certificates/public;
......
[openvpn-api-ketupa-neutrinet-me]
listen = /var/run/php-openvpn-api-ketupa-neutrinet-me.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
user = vagrant
group = vagrant
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 500
env[HOSTNAME] = $HOSTNAME
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
php_admin_value[memory_limit] = 256M
php_flag[display_errors] = on
php_admin_value[date.timezone] = Etc/UTC
php_admin_value[max_execution_time] = 900
env[APP_ENV] = "dev"
......@@ -21,16 +21,38 @@
become: yes
become_user: postgres
- name: Composer install
composer:
command: install
working_dir: /home/vagrant/src/backend/openvpn
executable: /usr/bin/php8.0
no_dev: no
become_user: vagrant
- name: copy virtualhost php
copy:
src: openvpn-api-ketupa-neutrinet-me.conf
dest: /etc/php/8.0/fpm/pool.d/openvpn-api-ketupa-neutrinet-me.conf
owner: root
group: root
mode: "u+rw,g+r,o+r"
notify: restart php8.0-fpm
- name: Create database postgresql
postgresql_db:
name: "ketupa-backend-openvpn"
become: yes
become_user: postgres
- name: Create user postgresql
postgresql_user:
db: "ketupa-backend-certificates"
name: "ketupa-backend-certificates"
db: "ketupa-backend-openvpn"
name: "ketupa-backend-openvpn"
priv: ALL
password: "password"
become: yes
become_user: postgres
- name: Composer install
composer:
command: install
......
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