瀏覽代碼

Friendica http redirect

Bob Mottram 11 年之前
父節點
當前提交
3e1c87e476
共有 1 個文件被更改,包括 13 次插入8 次删除
  1. 13
    8
      beaglebone.txt

+ 13
- 8
beaglebone.txt 查看文件

@@ -3847,15 +3847,20 @@ See [[Setting up a web site]] for details of how to update the Apache configurat
3847 3847
 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:
3848 3848
 
3849 3849
 #+BEGIN_SRC: bash
3850
-emacs /etc/apache2/sites-available/mydomainname.com
3850
+emacs /etc/apache2/sites-available/myfriendicadomainname.com
3851 3851
 #+END_SRC
3852 3852
 
3853
-Within the section which begins with *<VirtualHost *:80>* change the following:
3853
+Replace the section which begins with *<VirtualHost *:80>* with the following, replacing /myusername@mydomainname.com/ with your email address and /myfriendicadomainname.com/ with your Friendica domain name:
3854 3854
 
3855 3855
 #+BEGIN_SRC: bash
3856
-  <Directory /var/www/mydomainname.com/htdocs/>
3857
-    deny from all
3858
-  </Directory>
3856
+<VirtualHost *:80>
3857
+	ServerAdmin myusername@mydomainname.com
3858
+	ServerName myfriendicadomainname.com
3859
+
3860
+    RewriteEngine On
3861
+    RewriteCond %{HTTPS} off
3862
+    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
3863
+</VirtualHost>
3859 3864
 #+END_SRC
3860 3865
 
3861 3866
 Save and exit, then restart the apache server.
@@ -3911,7 +3916,7 @@ The .gitconfig file should look something like this:
3911 3916
 Get the source code.
3912 3917
 
3913 3918
 #+BEGIN_SRC: bash
3914
-export HOSTNAME=mydomainname.com
3919
+export HOSTNAME=myfriendicadomainname.com
3915 3920
 cd /var/www/$HOSTNAME
3916 3921
 mv htdocs htdocs_old
3917 3922
 git clone https://github.com/friendica/friendica.git htdocs
@@ -3929,10 +3934,10 @@ Install the poller.
3929 3934
 emacs /etc/crontab
3930 3935
 #+END_SRC
3931 3936
 
3932
-and append the following, changing mydomainname.com to whatever your domain is.
3937
+and append the following, changing /myfriendicadomainname.com/ to whatever your Friendica domain is.
3933 3938
 
3934 3939
 #+BEGIN_SRC: bash
3935
-*/10 *  * * *	root	cd /var/www/mydomainname.com/htdocs; /usr/bin/timeout 120 /usr/bin/php include/poller.php
3940
+*/10 *  * * *	root	cd /var/www/myfriendicadomainname.com/htdocs; /usr/bin/timeout 120 /usr/bin/php include/poller.php
3936 3941
 #+END_SRC
3937 3942
 
3938 3943
 Save and exit, then restart cron.