Compare commits

..

1 commit

Author SHA1 Message Date
Actaeus Curabitur
63e8be257b increased bucket size for nginx 2022-08-01 16:13:26 -05:00
7 changed files with 5 additions and 66 deletions

View file

@ -4,7 +4,6 @@ nginx:
https:
port: 8080
prot: http
wildcard: true
portal:
Dev:
@ -12,4 +11,3 @@ portal:
name: Clark Family Genealogy
summary: Clark Family Genealogy Dev Site
public: false
wildcard: true

View file

@ -1,37 +0,0 @@
server {
listen 8080;
server_name -branch-.-server-.actcur.com;
root /sites/-server-/-branch-/public;
index index.html index.htm index.php;
charset utf-8;
rewrite_log on;
location @laravel {
rewrite ^(/[^/]+/[^/]+)/(.*)$ $1/index.php?$2 last;
}
location / {
try_files $uri $uri/ @laravel;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
error_log /var/log/nginx/ra_error.log notice;
access_log /var/log/nginx/ra_access.log;
}

View file

@ -8,8 +8,6 @@ branches=`git ls-remote {{repo}} | grep -o -P "(?<=refs/heads/).*"`
echo "Branches:<br/>" > /sites/{{project}}/index.php
for branch in $branches; do
echo " <a href='$branch/public/'>$branch<br/>" >> /sites/{{project}}/index.php
#create/update nginx conf file
sed -e "s/-branch-/$branch/" -e "s/-server-/{{project}}/" /root/scripts/laradev-branch-nginx.template > /etc/nginx/conf.d/laradev-{{project}}-$branch.conf
#clone new branch if necessary
if [ ! -d "$branch" ];then
git clone -b $branch {{repo}} "$branch"
@ -43,5 +41,4 @@ echo " <a href='$branch/public/'>$branch<br/>" >> /sites/{{project}}/index.php
done
chown http:http "/sites/{{project}}" -R
{%- endfor -%}
systemctl restart nginx
{% endif %}

View file

@ -101,13 +101,6 @@ laradev-nginx-conf:
- template: jinja
password: "{%- include 'secure/passwords/laradev_db_password.txt' -%}"
/root/scripts/laradev-branch-nginx.template:
file.managed:
- source: salt://roles/maintain/laradev/branch.conf
- user: root
- group: root
- mode: 644
"/lib/systemd/system/git_branches.service":
file.managed:
- source: salt://roles/maintain/laradev/git_branches.service

View file

@ -1,7 +1,7 @@
server {
listen 8080;
server_name {{server}}.actcur.com;
root /sites/{{server}}/prod/public;
server_name {{server}};
root /sites/{{server}};
index index.html index.htm index.php;

View file

@ -3,12 +3,6 @@
{%- else -%}
{%- set default = "yes" -%}
{%- endif -%}
{%- set wildcard = "" -%}
{%- if pillar['nginx'][server]['wildcard'] is defined -%}
{%- if pillar['nginx'][server]['wildcard'] -%}
{%- set wildcard = "*." ~ server ~ ".actcur.com" -%}
{%- endif -%}
{%- endif -%}
{%- if pillar['nginx'][server]['https'] is defined -%}
{%- if pillar['nginx'][server]['https']['port'] is defined-%}
{%- set port = pillar['nginx'][server]['https']['port'] -%}
@ -20,10 +14,10 @@
{%- endif -%}
server {
listen 443;
server_name {{server}}.actcur.com {{wildcard}};
server_name {{server}}.actcur.com;
resolver {{ resolver }};
set $backend "{{prot}}://$server_name{%- if port is defined -%}:{{port}}{%- endif -%}";
set $backend "{{prot}}://{{server}}.actcur.com{%- if port is defined -%}:{{port}}{%- endif -%}";
ssl on;
ssl_certificate /etc/nginx/certs/{{server}}.actcur.com/fullchain.pem;

View file

@ -4,16 +4,10 @@
{%- set auth = pillar['nginx'][server]['auth'] -%}
{%- endif -%}
{%- endif -%}
{%- set wildcard = "" -%}
{%- if pillar['nginx'][server]['wildcard'] is defined -%}
{%- if pillar['nginx'][server]['wildcard'] -%}
{%- set wildcard = "*." ~ server ~ ".actcur.com" -%}
{%- endif -%}
{%- endif -%}
server {
listen 443;
server_name {{server}}.actcur.com {{wildcard}};
server_name {{server}}.actcur.com;
resolver {{resolver}};
set $backend "https://{{server}}.actcur.com";