Hello everyone,
Apologies if this is on the wrong subforum, wasn’t sure if I should post here on in Networking.
Also sorry for the weird formatting, I wrote this out in a Google Doc and then copy+pasted it over here.
I was hoping someone might be able to give me an in-depth explanation and/or walkthrough on how to get Apache on my home server configured the way I want. I have a basic grasp on this but I think there’s some pieces of the puzzle that I’m not understanding. I understand that I need to use Apache VirtualHosts, and I think I also need to have the sites listening on different port numbers? I’m just not sure how to get it all to fit together
Desired Results:
1. Nextcloud installed and accessible from Internet. So mydomain.ddns.net/nextcloud goes to my Nextcloud (unless it needs to be something like mydomain.ddns.netortnumber)
2. A Wordpress site installed and accessible from Internet (which I know how to do assuming I can get Apache VirtualHosts to do what I’m wanting). So mydomain.ddns.net goes to my wordpress site, unless it needs to be something like mydomain.ddns.netortnumber
3. Webmin installed and accessible from Internet (if applicable, can’t remember if Webmin is local only) (pretty sure I can get this working on my own once I understand VirtualHosts). So mydomain.ddns.net/webmin goes to Webmin for my server, unless it needs to be something like mydomain.ddns.netortnumber
4. Have everything secured with HTTPS/SSL/TLS
Basically, I need to understand how to configure virutalhosts to all share my single DDNS domain for 3+ separate services (Nextcloud, Wordpress, Webmin). Assuming that that’s even possible in the first place.
If it is possible, I’m not sure if it will need to be setup like mydomain.ddns.net/page or mydomain.ddns.netortnumber
My Setup:
- ASUS router running asuswrt-merlin 384.6 configured with my DDNS domain
- Ubuntu Server 18.04
What I’ve Done So Far:
- 1. Installed LAMP stack following this article:
(https://www.ostechnix.com/install-ap...-ubuntu-16-04/)
“Hardened” Apache installation following this article:
(https://hostadvice.com/how-to/how-to...-ubuntu-18-04/
- Opened ports 80 and 443 on my server (along with 22 which was already open so I can SSH into my server remotely)
- Installed Nextcloud following this article: (https://websiteforstudents.com/setup...p-7-1-support/)
- In apache ports.conf, I have three Listen statements, listening on 80,443, and 10000. I think in order for this to work, each service/instance has to be on a separate port number? So I was going to run Nextcloud on 10000, and then Webmin on something else
- I have a virtualhost file configured and enabled via a2ensite for nextcloud (configured as part of the aforementioned installation process), along with the default virtualhost files (000-default.conf and default-ssl.conf)
The Problem(s):
- I don’t understand the difference between /var/www/html and /var/www/. I understand that /html is the “Apache Default site”, and I can reach the default apache page when I’m on my LAN. And I understand that additional websites should be created in www rather than www/html, but what’s confusing about this is that Nextcloud is installed in www/html/nextcloud. Shouldn’t it be www/nextcloud? Is www the “root” of the Apache server? If so, then do I even need the www/html folder? And can I just move the Nextcloud installation from www/html to www?
- I can reach my Nextcloud via the Internet when I go to mydomain.ddns.net/nextcloud, however I would expect that mydomain.ddns.net by itself should show the default Apache page shouldn’t it? But instead I get “This site can’t provide a secure connection - mydomain.ddns.net sent an invalid response: “ERR_SSL_PROTOCOL_ERROR”. I don’t know what to do about this.
- When going through the process to automatically obtain a Let’s Encrypt cert, do I need a separate cert for every site on the Apache server? Or can I just have one cert that applies to the entire apache server regardless of how many sites are on it?
- I found this article on getting a Lets Encrypt cert, but part of the prerequisites include “Both of the following DNS records set up for your server...”, but, set up where? Whose DNS? Do I need to have a local DNS server running as well? My DDNS domain is registered with no-ip and is also configured on my router so the domain should always be pointing to my WAN IP. Is that sufficient or do I need something more?
(https://www.digitalocean.com/communi...n-ubuntu-18-04)
- In general I’m just having trouble wrapping my head around this, and I’m not sure if it even CAN work the way I want it to, and since I’m new to this I don’t know what I don’t know so I’m not entirely sure what I should be asking.
Can someone tell me what I’m missing here or point me in the right direction to be able to accomplish my Desired Results. I’m brand new to Apache and web hosting in general so I’m kinda just learning this as I go along. Please don’t hesitate to point me to any relevant documentation although I may have to ask additional questions if I don’t understand it.
Thanks in advance!
Bookmarks