Installed but not serving


#1

ran through install for ubuntu here. have diaspora running alongside apache and mysql.

%MEM %CPU   RSS    VSZ COMMAND
 9.3  0.1 190060 1108392 /usr/sbin/mysqld
 6.5  6.0 131856 527256 spring app    | diaspora | started 5 mins ago | development mode
 6.2  5.6 126184 519440 spring app    | diaspora | started 5 mins ago | production mode
 4.6  0.1 93748 362980 /usr/bin/python3 /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x -b
 2.4  0.2 50308 510336 /usr/sbin/apache2 -k start
 1.8  0.0 37192 430520 /usr/sbin/apache2 -k start
 1.7  0.0 36216 433272 /usr/sbin/apache2 -k start
 0.8  0.0 17020 411964 spring server | diaspora | started 69 hours ago

using external URL with lets encrypt cert. for 443. static test html file served no problem. nothing diaspora served. I suspect a faulty reverse proxy config. below is my apache2 .conf file. please advise! thank you!

<Directory /var/www/html/pod.domainname.org/public_html>
    Require all granted
    Options -MultiViews
    AllowOverride All
</Directory>
<VirtualHost *:80>
        ServerName pod.domainname.org
        ServerAlias www.pod.domainname.org
        ServerAdmin dodad@dhgdhhs.net
        DocumentRoot /var/www/html/pod.domainname.org/public_html

        ErrorLog /var/www/html/pod.domainname.org/logs/error.log
        CustomLog /var/www/html/pod.domainname.org/logs/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =pod.domainname.org [OR]
RewriteCond %{SERVER_NAME} =www.pod.domainname.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 <Proxy balancer://upstream>
  # Recommended, using a unix socket (Requires Apache >= 2.4)
  BalancerMember unix:///path/to/diaspora/tmp/diaspora.sock|http://
  # Alternatively let diaspora listen on a local port (Use this for Apache < 2.4)
  # BalancerMember http://localhost:3000
</Proxy>
ProxyRequests Off
 ProxyVia On
 ProxyPreserveHost On
 RequestHeader set X_FORWARDED_PROTO https

 <Proxy *>
  # Apache < 2.4
  #Order allow,deny
  #Allow from all
  # Apache >= 2.4
  Require all granted
</Proxy>
</VirtualHost>

(Olav Folland) #2

A couple of things stand out immediately -
Your :80 should just redirect to a :443 virtualhost, with all the stuff in the 443 section

Diaspora puts everything in /home/diaspora/diaspora, and I’m not sure how much of that is hard-coded. Your DocumentRoot should be /home/diaspora/diaspora/public

BalancerMember should be unix:///path/to/diaspora/tmp/diaspora.sock|https:// not http:, or you’ll get stuck in a loop.

FWIW I ripped my LAMP setup from here: https://gist.github.com/jhass/719014#gist$
Make sure you scroll down and make sure all the mods in the comments are enabled.


#3

Thanks Olav. I’ve done that and restarted apache. Now in firefox I’m getting ERR_TOO_MANY_REDIRECTS. the apache access log file shows only

157.131.93.250 - - [05/Mar/2019:09:45:55 -0800] "GET / HTTP/1.1" 301 754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
157.131.93.250 - - [05/Mar/2019:09:45:55 -0800] "GET / HTTP/1.1" 301 754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
157.131.93.250 - - [05/Mar/2019:09:45:56 -0800] "GET / HTTP/1.1" 301 754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
157.131.93.250 - - [05/Mar/2019:09:45:56 -0800] "GET / HTTP/1.1" 301 754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"

btw nothing is being written to ~/diaspora/log
everything seems to be running

%MEM %CPU   RSS    VSZ COMMAND
 6.5  2.2 133040 522272 spring app    | diaspora | started 2 hours ago | production mode
 6.4  2.2 129960 525992 spring app    | diaspora | started 2 hours ago | development mode
 4.6  0.1 94832 364004 /usr/bin/python3 /usr/bin/fail2ban-server -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid -x -b
 2.5  0.1 50944 510340 /usr/sbin/apache2 -k start
 2.1  0.1 43680 433900 /usr/sbin/apache2 -k start
 2.0  0.0 41288 433952 /usr/sbin/apache2 -k start
 1.9  0.0 38916 430616 /usr/sbin/apache2 -k start
 1.5  0.0 31412 431832 /usr/sbin/apache2 -k start
 1.5  0.0 30696 431836 /usr/sbin/apache2 -k start
 1.4  0.0 29340 431828 /usr/sbin/apache2 -k start
10.5  0.1 214440 1108392 /usr/sbin/mysqld
 0.8  0.0 17208 411964 spring server | diaspora | started 85 hours ago

What to do now?


(Olav Folland) #4

Hrm. I’m like zero familiar with spring, I use sysctl to handle services. It might be worth restarting the diaspora server after major apache changes (I do that on spec).

Clearing your browser cache sometimes helps with redirect errors tho.

Here’s my apache2 config, which might help. IIRC there were a few funny bits when I initially set up, but hellifican remember them now. https://pastebin.com/DeDTVVue