0
I decided to install Proxmox on my new server to host Web, Email and VPS servers. That way, I can set up multiple VMs for each server type.
I went with Debian 9 for my apache web server. And I have also already managed to import my WordPress sites imported using the duplicator plugin, and that worked flawlessly. I edited my WP_Options table in PHPMyAdmin to https instead of HTTP as the site URL, then I set up my Apache virtual host like this (mydomain.com.conf)
<VirtualHost *:80>
ServerName mydomain.com
ServerAdmin root@localhost
Redirect "/" "https:// mydomain.com"
</VirtualHost>
<VirtualHost *:443>
ServerAdmin root@localhost
DocumentRoot /var/www/mydomain.com
ServerName mydomain.com
ServerAlias www.mydomain.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
<Directory /var/www/mydomain.com>
AllowOverride All
DirectoryIndex index.php
Require all granted
</Directory>
</VirtualHost>
I can access my website locally by setting up a rule in my Windows hosts file like this:
192.168.10.104 mydomain.com
I also set up a static IP to avoid the web server getting a new IP address. I did that in /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug ens18
iface ens18 inet static
address 192.168.10.104
netmask 255.255.255.0
gateway 192.168.10.1
# This is an autoconfigured IPv6 interface
iface ens18 inet6 auto
I do want to point out that I made a virtual host for my [public IP address][1].
To avoid conflicts, I disabled the UFW firewall and removed fail2ban. Just for now.
In my view, my DNS, nameservers and port forwarding is set up correctly. However, I could be wrong, though.
[My domain registrar NS configurations][2]
[My DNS configurations on DigitalOcean][3]
[My Portforwarding configurations][4]
If I try to reach my website using [UpTrends][5] I get "TCP Connection Failed". There is also no issues on my SSL certificated from my local point of view on the website.
Any advice?
A direct virtual host for your IP seems to work. Does the site reliably work if you use the local DNS entry? What's in the apache logs if anything? – Seth – 2019-07-03T11:59:12.950