https port switch

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
tux
Posts: 2
Joined: Wed Oct 16, 2019 6:38 pm

https port switch

Post by tux »

Hello,
i have installed DietPI buster on a RPi4 with Nextcloud.
Its working fine include lets encrypt to my ddns eg:

https://mustermann.ddns.com/nextcloud

The Server is working fine (with the Port 443),

but now the Port 443 is used from a other Server, i will make a Port switch to Port 4443 eg:

https://mustermann.ddns.com:4443/nextcloud

i cant find: (Sample)
/etc/apache2/sites-available/default

listen 443 ssl; # managed by Cerbot
change to
listen 4443 ssl; # managed by Cerbot

and : (Sample)
/var/www/nextcloud/config/config.php

1 => 'mustermann.ddns.com',
change to
1 => 'mustermann.ddns.com:4443',

and restart the Raspberry Pi

but i cant find the 2 config files.
Can you help me? :cry:

(ok for an update of lets encrypt I have to change the port back at short notice, this is known to me)

regards
tux
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: https port switch

Post by MichaIng »

Jep, for LetsEncrypt you need to switch back. However is port 443 used by another service on the same server machine? Otherwise it would be easier to keep the webserver listen on port 443 but forward 4443 from router to 443 on server?

However, if you can't find the config files:
- Are you sure that Apache ist your webserver? By default, if you did not select a different choice, Lighttpd is installed, with config file /etc/lighttpd/lighttpd.conf. Port change should be trivial there.
- /var/www/nextcloud/config/config.php however must exist, if Nextcloud is running. Probably some typo when searching for it?
tux
Posts: 2
Joined: Wed Oct 16, 2019 6:38 pm

Re: https port switch

Post by tux »

ok,
there are 2 server machines.

/var/www/nextcloud/config/config.php however is exist.

i have edit it - ok

and yes, Lighttpd is installed, with config file /etc/lighttpd/lighttpd.conf

but i dont know the syntax for Lighttpd ?

listen 4443 ssl; # managed by Cerbot >>> is not working

regards
tux
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: https port switch

Post by MichaIng »

Hmm, you restarted Lighttpd? Also check: journalctl -u lighttpd or /var/log/lighttpd/ for logs. Especially if it started up successfully and some line that states that it listens to port 4443 (should be inside somewhere, AFAIK).
Post Reply