aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/nginx.conf7
-rw-r--r--scripts/install5
2 files changed, 10 insertions, 2 deletions
diff --git a/conf/nginx.conf b/conf/nginx.conf
index a6769a7..915061d 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,4 +1,11 @@
location __PATH__ {
+ alias __FINALPATH__/live/public;
+
+ if ($scheme = http) {
+ rewrite ^ https://$server_name$request_uri? permanent;
+ }
+
+
try_files $uri @proxy;
}
diff --git a/scripts/install b/scripts/install
index e73ad27..29167bc 100644
--- a/scripts/install
+++ b/scripts/install
@@ -135,9 +135,9 @@ pushd /var/cache/yunohost/from_file/scripts
sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service
sudo chown root: /etc/systemd/system/mastodon-web.service
-sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-sidekiq.service
+sudo cp ../conf/mastodon-sidekiq.service /etc/systemd/system/mastodon-sidekiq.service
sudo chown root: /etc/systemd/system/mastodon-sidekiq.service
-sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-streaming.service
+sudo cp ../conf/mastodon-streaming.service /etc/systemd/system/mastodon-streaming.service
sudo chown root: /etc/systemd/system/mastodon-streaming.service
sudo systemctl enable /etc/systemd/system/mastodon-*.service
@@ -154,6 +154,7 @@ sudo yunohost service add mastodon-streaming
# Copy nginx config
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
+sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf
# Install crontab
sudo cp ../conf/crontab_mastodon /etc/cron.d/$app