From 3e1c87e476b1506e05a44b8c50f6f05770611ec8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 22 Apr 2014 22:04:29 +0100 Subject: [PATCH] Friendica http redirect --- beaglebone.txt | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/beaglebone.txt b/beaglebone.txt index e9728258..9d1247ab 100644 --- a/beaglebone.txt +++ b/beaglebone.txt @@ -3847,15 +3847,20 @@ See [[Setting up a web site]] for details of how to update the Apache configurat Edit your Apache configuration and disable the port 80 (HTTP) version of the site. We only want to log into Friendica via HTTPS, so to prevent anyone from accidentally logging in insecurely: #+BEGIN_SRC: bash -emacs /etc/apache2/sites-available/mydomainname.com +emacs /etc/apache2/sites-available/myfriendicadomainname.com #+END_SRC -Within the section which begins with ** change the following: +Replace the section which begins with ** with the following, replacing /myusername@mydomainname.com/ with your email address and /myfriendicadomainname.com/ with your Friendica domain name: #+BEGIN_SRC: bash - - deny from all - + + ServerAdmin myusername@mydomainname.com + ServerName myfriendicadomainname.com + + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + #+END_SRC Save and exit, then restart the apache server. @@ -3911,7 +3916,7 @@ The .gitconfig file should look something like this: Get the source code. #+BEGIN_SRC: bash -export HOSTNAME=mydomainname.com +export HOSTNAME=myfriendicadomainname.com cd /var/www/$HOSTNAME mv htdocs htdocs_old git clone https://github.com/friendica/friendica.git htdocs @@ -3929,10 +3934,10 @@ Install the poller. emacs /etc/crontab #+END_SRC -and append the following, changing mydomainname.com to whatever your domain is. +and append the following, changing /myfriendicadomainname.com/ to whatever your Friendica domain is. #+BEGIN_SRC: bash -*/10 * * * * root cd /var/www/mydomainname.com/htdocs; /usr/bin/timeout 120 /usr/bin/php include/poller.php +*/10 * * * * root cd /var/www/myfriendicadomainname.com/htdocs; /usr/bin/timeout 120 /usr/bin/php include/poller.php #+END_SRC Save and exit, then restart cron.