Commit 845834ba authored by Cameron Carney's avatar Cameron Carney

revising https template; ensuring data storage permissions are correct

parent 0469caab
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
# Prep Container for usage # Prep Container for usage
function init { function init {
# Create the storage/cache directory # Create the storage/cache directories
if [ ! -d /data/storage ]; then if [ ! -d /data/storage ]; then
cp -pr storage.tmpl /data/storage cp -pr storage.tmpl /data/storage
chown -R nginx:nginx /data/storage
fi fi
if [ ! -d /data/cache ]; then if [ ! -d /data/cache ]; then
...@@ -16,7 +17,7 @@ function init { ...@@ -16,7 +17,7 @@ function init {
chown -R nginx:nginx /data/cache chown -R nginx:nginx /data/cache
fi fi
# destroy links and recreate them # destroy links (or files) and recreate them
rm -rf storage rm -rf storage
ln -s /data/storage storage ln -s /data/storage storage
...@@ -68,13 +69,12 @@ function startServer { ...@@ -68,13 +69,12 @@ function startServer {
if [ "${SSL}" == "true" ]; then if [ "${SSL}" == "true" ]; then
echo "Enabling SSL" echo "Enabling SSL"
envsubst '${DOMAIN_NAME},${SSL_CERT},${SSL_CERT_KEY}' \ envsubst '${SSL_CERT},${SSL_CERT_KEY}' \
< /etc/nginx/templates/https.conf.tmpl > /etc/nginx/conf.d/default.conf < /etc/nginx/templates/https.conf.tmpl > /etc/nginx/conf.d/default.conf
else else
echo "Disabling SSL" echo "Disabling SSL"
envsubst '${DOMAIN_NAME}' \ /etc/nginx/templates/http.conf.tmpl > /etc/nginx/conf.d/default.conf
< /etc/nginx/templates/http.conf.tmpl > /etc/nginx/conf.d/default.conf
fi fi
exec supervisord --nodaemon exec supervisord --nodaemon
......
...@@ -19,7 +19,7 @@ server { ...@@ -19,7 +19,7 @@ server {
root /var/www/html/public; root /var/www/html/public;
index index.php; index index.php;
access_log /var/log/nginx/pterodactyl.app-access.log; access_log off;
error_log /var/log/nginx/pterodactyl.app-error.log error; error_log /var/log/nginx/pterodactyl.app-error.log error;
# allow larger file uploads and longer script runtimes # allow larger file uploads and longer script runtimes
...@@ -45,7 +45,7 @@ server { ...@@ -45,7 +45,7 @@ server {
location / { location / {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php?$query_string;
} }
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
......
...@@ -16,4 +16,4 @@ slowlog = /dev/stdout ...@@ -16,4 +16,4 @@ slowlog = /dev/stdout
request_slowlog_timeout = 60s request_slowlog_timeout = 60s
catch_workers_output = yes catch_workers_output = yes
clear_env = no clear_env = no
\ No newline at end of file
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