[GLLUG] nginx oops!

MJ mirojrsc at yahoo.co.uk
Sun Nov 29 15:03:58 UTC 2020


 your q: Is that server actually running and listening for requests?
?!? seems on Listening, symbolic link see bellow

See below do I rename file and recreate?

########################:/etc/nginx/sites-available$ systemctl status diaspora-web
● diaspora-web.service - Diaspora social network (unicorn)
 Loaded: loaded (/etc/systemd/system/diaspora-web.service; enabled; vendor preset: enabled)
 Active: active (running) since Sun 2020-11-29 14:44:33 GMT; 54s ago
 Main PID: 4830 (ruby)
 Tasks: 2 (limit: 2199)
 Memory: 23.2M
 CGroup: /system.slice/diaspora-web.service
 └─4830 ruby /home/diaspora/.rvm/gems/ruby-2.6.5 at diaspora/bin/unicorn -c config/unicorn.rb -E production
#########################:/etc/nginx/sites-available$ systemctl status diaspora-sidekiq
● diaspora-sidekiq.service - Diaspora social network (sidekiq)
 Loaded: loaded (/etc/systemd/system/diaspora-sidekiq.service; enabled; vendor preset: enabled)
 Active: active (running) since Sun 2020-11-29 14:43:47 GMT; 2min 11s ago
 Main PID: 4651 (ruby)
 Tasks: 2 (limit: 2199)
 Memory: 57.8M
 CGroup: /system.slice/diaspora-sidekiq.service
 └─4651 ruby /home/diaspora/.rvm/gems/ruby-2.6.5 at diaspora/bin/sidekiq

/etc/nginx/sites-available$ ln -s /etc/nginx/sites-available/diaspora /etc/nginx/sites-enabled/
ln: failed to create symbolic link '/etc/nginx/sites-enabled/diaspora': File exists
-- 
MJ
=============================================
"I JUST WANNA DO GOD'S WILL!" -- Dr. Martin L. King Jr.
"AND IF YOU TOLERATE THIS, YOUR CHILDREN WILL BE NEXT" -- MSP
=============================================


     On Sunday, 29 November 2020, 14:20:42 GMT, John Winters via GLLUG <gllug at mailman.lug.org.uk> wrote:  
 
 On 29/11/2020 13:46, MJ via GLLUG wrote:
[snip default configuration]

> upstream diaspora_server {
> server unix:/home/diaspora/diaspora/tmp/diaspora.sock;
> }

Ah - you're trying to use Nginx as a front-end to some kind of server 
software.

[snip]

> root /home/diaspora/diaspora/public;
> 
> client_max_body_size 5M;
> client_body_buffer_size 256K;
> 
> try_files $uri @diaspora;
> 
> location /assets/ {
> expires max;
> add_header Cache-Control public;
> }
> location @diaspora {
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Proto https;
> proxy_set_header Host $http_host;
> proxy_redirect off;
> proxy_pass http://diaspora_server;
> }
> }

So you've told Nginx first to try serving files from 
/home/diaspora/diaspora/public, and if not found there to pass requests 
on to the diaspora server.  Is that server actually running and 
listening for requests?

John

-- 
Xronos Scheduler - https://xronos.uk/
All your school's schedule information in one place.
Timetable, activities, homework, public events - the lot
Live demo at https://schedulerdemo.xronos.uk/

-- 
GLLUG mailing list
GLLUG at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20201129/0f841b07/attachment.html>


More information about the GLLUG mailing list