diff --git a/pillar/webserver/sites.sls b/pillar/webserver/sites.sls --- a/pillar/webserver/sites.sls +++ b/pillar/webserver/sites.sls @@ -99,6 +99,18 @@ DATASTORE: /var/dataroot/wolfplex CREDENTIAL_PATH_DATASOURCES_SECURITYDATA: /var/dataroot/wolfplex/secrets.json + # Zed + hypership.space: + domain: hypership.space + subdomain: www + user: web-space-hypership-www + source: wwwroot/hypership.space/www + target: /var/wwwroot/hypership.space/www + php-fpm: prod + env: + CACHE_DIR: /var/cache/zed + CONTENT_DIR: /srv/zed/content + # ------------------------------------------------------------- # States # diff --git a/roles/webserver-content/space/hypership/www.sls b/roles/webserver-content/space/hypership/www.sls --- a/roles/webserver-content/space/hypership/www.sls +++ b/roles/webserver-content/space/hypership/www.sls @@ -19,4 +19,18 @@ - name: https://github.com/hypership/content.git - target: /srv/zed/content +# ------------------------------------------------------------- +# Cache +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +/var/cache/zed: + file.directory: + - user: web-space-hypership-www + +{% for subdir in ['compiled', 'openid', 'sessions'] %} +/var/cache/zed/{{ subdir }}: + file.directory: + - user: web-space-hypership-www +{% endfor %} + {% endif %} diff --git a/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf b/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf --- a/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf +++ b/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf @@ -27,6 +27,11 @@ error_log /var/log/www/hypership.space/www-error.log; access_log /var/log/www/hypership.space/www-access.log; + root /var/wwwroot/hypership.space/www; + index index.html index.php; + + error_page 503 /503.html; + location /content { return 403; } @@ -45,8 +50,29 @@ } } + location = /tour { + return 302 /tour.html; + } + location / { + try_files $uri $uri/ @app; + + location ~ \.php$ { + return 503; + + #fastcgi_pass unix:/var/run/web/hypership.space/php-fpm.sock; + #fastcgi_index index.php; + #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + #include includes/fastcgi_params; + } + } + + location @app { return 503; + + #fastcgi_pass unix:/var/run/web/hypership.space/php-fpm.sock; + #fastcgi_param SCRIPT_FILENAME /var/wwwroot/hypership.space/www/index.php; + #include includes/fastcgi_params; } }