1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/roles/nginx/templates/vhost.conf

27 lines
820 B
Text
Raw Permalink Normal View History

2021-05-05 19:26:23 +02:00
server {
listen 80 default_server;
listen [::]:80 default_server;
2022-05-02 17:37:08 +02:00
root /var/www/{{ scope }}/projectsend/current;
2021-05-05 19:26:23 +02:00
index index.php;
server_name _;
2022-05-02 17:37:08 +02:00
{% if gzip %}
include /etc/nginx/snippets/gzip.conf;
{% endif %}
2021-05-05 19:26:23 +02:00
location / {
2022-05-02 17:37:08 +02:00
try_files $uri $uri/ /index.php;
2021-05-05 19:26:23 +02:00
}
2022-05-02 17:37:08 +02:00
location ~ \.php$ {
2021-05-05 19:26:23 +02:00
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
2022-05-02 17:37:08 +02:00
error_log /var/log/nginx/projectsend_{{ scope }}_error.log;
access_log /var/log/nginx/projectsend_{{ scope }}_access.log;
2021-05-05 19:26:23 +02:00
}