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