logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Selfsolved: Apache and Syncthing
Author
Akkor



Joined: 23 May 2020
Posts: 1
Location: Roma

PostPosted: Sat 23 May '20 22:34    Post subject: Selfsolved: Apache and Syncthing Reply with quote

Hi
I have a home made server
Ubuntu server 18.04
Apache version 2.4.29
I nedd to have syncthing access from the web at syncthing.mydomain.com
I have read a lot of guides but I'm not able to find the solution

When I try to go to syncthing.mydomain.com browser show me this:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.4.29 (Ubuntu) Server at syncthing.mydomain.com Port 80
But all other webgui service like Plex Media Server, Netdata, phpmyadmin or transmission is running well.....so other vhost and apache is ok

This is my vhost config
Code:
<VirtualHost *:80>
    RewriteEngine On
    ProxyRequests Off
    ProxyPreserveHost On
   
    ServerName syncthing.webmanaging.it

    <Proxy *>
        Require all granted
    </Proxy>

    ProxyPass "/" "http://localhost:8384/" connectiontimeout=5 timeout=30 keepalive=on
    ProxyPassReverse "/" "http://localhost:8384/"

    ErrorLog ${APACHE_LOG_DIR}/syncthing-error.log
    CustomLog ${APACHE_LOG_DIR}/syncthing-access.log combined
</VirtualHost>


This is the syncthing error log
Code:
[Sat May 23 19:54:19.608257 2020] [proxy:error] [pid 1406] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8384 (localhost) failed
[Sat May 23 19:54:19.608295 2020] [proxy_http:error] [pid 1406] [client 172.68.198.28:39884] AH01114: HTTP: failed to make connection to backend: localhost, referer: https://syncthing.mydomain.com/


This is the section where I set the gui address and port in syncthing
Code:
<gui enabled="true" tls="true" debugging="false">
        <address>127.0.0.1:8384</address>


The firewall and the nat seems to be ok

This is syncthing status (it's running under root user)
Code:
root@ubuntu:~# systemctl status syncthing@root.service
syncthing@root.service - Syncthing - Open Source Continuous File Synchronization for root
   Loaded: loaded (/etc/systemd/system/syncthing@.service; indirect; vendor preset: enabled)
   Active: active (running) since Sat 2020-05-23 11:48:35 UTC; 8h ago
     Docs: man:syncthing(1)
 Main PID: 1632 (syncthing)
    Tasks: 30 (limit: 4915)
   CGroup: /system.slice/system-syncthing.slice/syncthing@root.service
           ├─1632 /usr/bin/syncthing -no-browser -gui-address=192.168.1.10:8384 -no-restart -logflags=0
           └─2015 /usr/bin/syncthing -no-browser -gui-address=192.168.1.10:8384 -no-restart -logflags=0

May 23 11:48:38 ubuntu syncthing[1632]: [J3GAA] INFO: Access the GUI via the following URL: https://192.168.1.10:8384/
May 23 11:48:38 ubuntu syncthing[1632]: [J3GAA] INFO: My name is "ubuntu"
May 23 11:48:38 ubuntu syncthing[1632]: [J3GAA] WARNING: Syncthing should not run as a privileged or system user. Please consider using a normal user account.
May 23 11:48:49 ubuntu syncthing[1632]: [J3GAA] INFO: Detected 1 NAT service
May 23 11:48:57 ubuntu syncthing[1632]: [J3GAA] INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
May 23 11:48:57 ubuntu syncthing[1632]: [J3GAA] INFO: quic://0.0.0.0:22000 resolved external address quic://94.34.***.***:1026 (via stun.syncthing.net:3478)
May 23 11:49:08 ubuntu syncthing[1632]: [J3GAA] INFO: Joined relay relay://94.130.20.120:22067
May 23 11:54:55 ubuntu syncthing[1632]: [J3GAA] INFO: quic://0.0.0.0:22000 resolved external address quic://94.34.***.***:22000 (via stun.syncthing.net:3478)
May 23 12:41:25 ubuntu syncthing[1632]: [J3GAA] INFO: quic://0.0.0.0:22000 resolved external address quic://94.34.***.***:1026 (via stun.syncthing.net:3478)
May 23 12:45:10 ubuntu syncthing[1632]: [J3GAA] INFO: quic://0.0.0.0:22000 resolved external address quic://94.34.***.***:22000 (via stun.syncthing.net:3478)


Thanks for your help
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Sun 24 May '20 20:47    Post subject: Reply with quote

Quote:
<gui enabled="true" tls="true" debugging="false">
<address>127.0.0.1:8384</address>


TLS means https

load mod_proxy_connect, too and change ProxyPass and ProxyPassReverse to https
Back to top


Reply to topic   Topic: Selfsolved: Apache and Syncthing View previous topic :: View next topic
Post new topic   Forum Index -> Other Software