mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
[fix] Nginx default_type directive + sed commands with paths
This commit is contained in:
parent
bcb80b94f7
commit
2c6a89f068
3 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
||||||
location PATHTOCHANGE {
|
location PATHTOCHANGE {
|
||||||
alias ALIASTOCHANGE;
|
alias ALIASTOCHANGE;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
default_type text/html;
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
|
|
|
@ -34,10 +34,10 @@ sudo yunohost firewall allow TCP 21 > /dev/null 2>&1
|
||||||
sudo apt-get install pure-ftpd-ldap -y -qq
|
sudo apt-get install pure-ftpd-ldap -y -qq
|
||||||
|
|
||||||
# Change user ID in configurations
|
# Change user ID in configurations
|
||||||
sed -i "s/FTPUSER/$user/g" ../conf/ldap.conf
|
sed -i "s@FTPUSER@$user@g" ../conf/ldap.conf
|
||||||
sed -i "s/FTPDIR/$final_path/g" ../conf/ldap.conf
|
sed -i "s@FTPDIR@$final_path@g" ../conf/ldap.conf
|
||||||
sed -i "s/FTPUSER/$user/g" ../sources/index.html
|
sed -i "s@FTPUSER@$user@g" ../sources/index.html
|
||||||
sed -i "s/HOST/$domain/g" ../sources/index.html
|
sed -i "s@HOST@$domain@g" ../sources/index.html
|
||||||
|
|
||||||
# Copy files to the right place
|
# Copy files to the right place
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
|
|
|
@ -8,8 +8,8 @@ is_public=$(sudo yunohost app setting my_webapp is_public)
|
||||||
final_path=/var/www/my_webapp
|
final_path=/var/www/my_webapp
|
||||||
|
|
||||||
# Change user ID in configurations
|
# Change user ID in configurations
|
||||||
sed -i "s/FTPUSER/$user/g" ../conf/ldap.conf
|
sed -i "s@FTPUSER@$user@g" ../conf/ldap.conf
|
||||||
sed -i "s/FTPDIR/$final_path/g" ../conf/ldap.conf
|
sed -i "s@FTPDIR@$final_path@g" ../conf/ldap.conf
|
||||||
|
|
||||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue