mirror of
https://github.com/YunoHost-Apps/osada_ynh.git
synced 2024-09-03 19:46:30 +02:00
Fixed permission issue
This commit is contained in:
parent
b79091c509
commit
6962065d5a
3 changed files with 26 additions and 25 deletions
|
@ -1,32 +1,33 @@
|
|||
location __PATH__
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
{
|
||||
alias __FINALPATH__/;
|
||||
# Force https
|
||||
if ($scheme = http)
|
||||
|
||||
if ($scheme = http)
|
||||
|
||||
{
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
if (!-e $request_filename)
|
||||
|
||||
|
||||
if (!-e $request_filename)
|
||||
|
||||
{
|
||||
rewrite ^(.*)$ /index.php?req=$1;
|
||||
}
|
||||
|
||||
|
||||
client_max_body_size 20m;
|
||||
client_body_buffer_size 128k;
|
||||
|
||||
|
||||
# Default indexes and catch-all
|
||||
index index.php;
|
||||
charset utf-8;
|
||||
|
||||
|
||||
|
||||
# Example PHP configuration
|
||||
location ~* \.php$
|
||||
location ~* \.php$
|
||||
{
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
@ -34,10 +35,10 @@
|
|||
|
||||
# make sure webfinger and other well known services aren't blocked
|
||||
# by denying dot files and rewrite request to the front controller
|
||||
location ^~ /.well-known/
|
||||
location ^~ /.well-known/
|
||||
{
|
||||
allow all;
|
||||
if (!-e $request_filename)
|
||||
if (!-e $request_filename)
|
||||
{
|
||||
rewrite ^(.*)$ /index.php?req=$1;
|
||||
}
|
||||
|
@ -51,23 +52,22 @@
|
|||
# expires 30d;
|
||||
# try_files $uri /index.php?q=$uri&$args;
|
||||
# }
|
||||
|
||||
|
||||
# block these file types
|
||||
location ~* \.(tpl|md|tgz|log|out)$
|
||||
location ~* \.(tpl|md|tgz|log|out)$
|
||||
{
|
||||
deny all;
|
||||
}
|
||||
|
||||
|
||||
# deny access to all dot files
|
||||
location ~ /\.
|
||||
location ~ /\.
|
||||
{
|
||||
deny all;
|
||||
}
|
||||
|
||||
|
||||
#deny access to store
|
||||
location ~ /store
|
||||
location ~ /store
|
||||
{
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ git clone https://codeberg.org/zot/osada.git "$final_path"
|
|||
# 2 - Osada Addons
|
||||
|
||||
# Make addon Directory and unpack the Osada addons to this directory
|
||||
ynh_script_progression --message="Create addon directory inside Osada root folder..."
|
||||
mkdir $final_path/addon
|
||||
# ynh_script_progression --message="Create addon directory inside Osada root folder..."
|
||||
# mkdir $final_path/addon
|
||||
ynh_script_progression --message="Setting up Osada addons source files..."
|
||||
|
||||
# ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
|
||||
|
@ -96,8 +96,9 @@ popd
|
|||
# 3 - Some extra folders
|
||||
ynh_script_progression --message="Creating smarty3 folder for personal data..."
|
||||
|
||||
mkdir -p "${final_path}/store/[data]/smarty3"
|
||||
chmod -R 775 $final_path/store
|
||||
mkdir -p "${final_path}/store"
|
||||
mkdir -p "${final_path}/cache/smarty3"
|
||||
chmod -R 777 $final_path/store $final_path/cache
|
||||
|
||||
# Copy the template install/htconfig.sample.php to .htconfig.php
|
||||
ynh_script_progression --message="Moving .htconfig.php to root of Osada ..."
|
||||
|
|
|
@ -91,7 +91,7 @@ ynh_setup_source --dest_dir="$final_path"
|
|||
pushd "$final_path"
|
||||
util/udall
|
||||
popd
|
||||
chmod -R 775 $final_path/store
|
||||
chmod -R 777 $final_path/store $final_path/cache
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue