Hi,
I have just installed nextcloud on my raspberry pi 2. I am also running pihole which uses port 80 for admin webpage and pivpn which runs on 443 tcp and udp.
I have managed to change the apache to run on a different port than 80 and i can access nextcloud from within my LAN and even the app works fine too.
On my firewall, I have 443 tcp and udp forwarded to my pi local ip address and my openvpn works fine. I have added port-share option on my openvpn server.conf and I am using port-share 4443 so that the traffic can pass to this port number internally.
My apache2/port.conf looks like below:
If you just change the port or add more ports here, you will likely also
have to change the VirtualHost statement in
/etc/apache2/sites-enabled/000-default.conf
Listen 880
Listen 4443 Listen 880vim: syntax=apache ts=4 sw=4 sts=4 sr noet
my 000-default.conf looks like below:
<VirtualHost *:880>
ServerName mydomain.ddns.net
Redirect permanent / https://mydomain.ddns.net/
# The ServerName directive sets the request scheme, hostname and port t$
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request’s Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
my default-ssl.conf looks like below:
Servername mydomain.ddns.net ServerAdmin webmaster@localhost DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice$
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
There are two issues I am facing as per below:
First issue: I cannot access nextcloud from the internet. Can you please help me how this can be achieved once you have looked at my files above. I do not want to change my pihole port 80 and pivpn 443. I would like to use alternative ports such as 880 and 4443.
Second issue: I have not been able to install SSL using certbot. my understanding is as the nextcloud is not using standard 80 and 443 ports, its causing issues for certbot to verify my website etc. I would like to understand how I can achieve this given the above information.
Happy to post any more files or run commands.
Look forward to response.
Best regards,
V P