Domain not reachable with multiple wordpress sites
Hello,
I was able to access the admin page for two new wordpress sites that I setup using this guide: https://www.linode.com/docs/websites/cms/configure-apache-to-run-multiple-wordpress-sites-on-one-linode/
The issue I'm having is accessing them with my domain customhomeservers.com of which I've already entered in the linode manager over 24 hours ago and also changed the NS records to ns1.linode.com, ns2…etc with google, where the domain is managed at.
From research, to see what vhosts are running, I ran this command: apache2ctl -S
and received the below.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server customhomeservers.com (/etc/apache2/sites-enabled/customhomeservers.com.conf:1)
port 80 namevhost customhomeservers.com (/etc/apache2/sites-enabled/customhomeservers.com.conf:1)
alias customhomeservers.com
wild alias *.customhomeservers.com
port 80 namevhost wisdomcompassion.org (/etc/apache2/sites-enabled/wisdomcompassion.org.conf:1)
alias wisdomcompassion.org
wild alias *.wisdomcompassion.org
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
Below are both my vhost conf files
<virtualhost *:80="">
# The primary domain for this host
ServerName customhomeservers.com
# Optionally have other subdomains also managed by this Virtual Host
ServerAlias customhomeservers.com *.customhomeservers.com
DocumentRoot /var/www/html/customhomeservers.com/public_html
<directory customhomeservers.com="" html="" public_html="" var="" www="">
Require all granted
# Allow local .htaccess to override Apache configuration settings
AllowOverride all
</directory>
# Enable RewriteEngine
RewriteEngine on
RewriteOptions inherit</virtualhost>
# Block .svn, .git
RewriteRule \.(svn|git)(/)?$ - [F]
# Catchall redirect to www.customhomeservers.com
RewriteCond %{HTTP_HOST} !^www.customhomeservers\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) https://www.customhomeservers.com/$1 [L,R]
# Recommended: XSS protection
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
and
<virtualhost *:80="">
# The primary domain for this host
ServerName wisdomcompassion.org
# Optionally have other subdomains also managed by this Virtual Host
ServerAlias wisdomcompassion.org *.wisdomcompassion.org
DocumentRoot /var/www/html/wisdomcompassion.org/public_html
<directory html="" public_html="" var="" wisdomcompassion.org="" www="">
Require all granted
# Allow local .htaccess to override Apache configuration settings
AllowOverride all
</directory>
# Enable RewriteEngine
RewriteEngine on
RewriteOptions inherit</virtualhost>
# Block .svn, .git
RewriteRule \.(svn|git)(/)?$ - [F]
# Catchall redirect to www.wisdomcompassion.org
RewriteCond %{HTTP_HOST} !^www.wisdomcompassion\.org [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) https://www.wisdomcompassion.org/$1 [L,R]
# Recommended: XSS protection
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
Can anyone please help me get this resolved?
1 Reply
It looks like your Linode is refusing connections on port 80 and 443 at the moment. Try restarting Apache with:
sudo systemctl restart apache2
If it still doesn't work, check your Linode's firewall rules with:
iptables -L -nv --line-numbers
It could be that there's a block in place for port 80 or 443.