Wordpress (possible apache

So i did that domain 1 resolves perfect all ways ( vewing page via Virtualmin GUI option and normal browsing)

Domain 2 … I can view the index page via the virtualmin gui but when browse normally as would be for web, i get the apache default page.

i can run 2 websites pointing to the same ip address right or do i have to create a whole new dns setup?

OK - so Domain 1 is fine & Domain 2 is awol.

Does

sudo apachectl -t

return OK? And does

sudo apachectl -S

now show that extra block for Domain 2? And is the DNS for Domain 2 correctly set up? i.e. the A records point to your VPS\Server?

seems to be awol yes - Created an A - Record pointing only to the ip for 2nd domain ( for testing )

Syntax OK

then:

sudo apache2ctl -S
VirtualHost configuration:
185.121.25.12:80 is a NameVirtualHost
default server all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:1)
port 80 namevhost all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:1)
alias www.all-pc.net
alias mail.all-pc.net
alias webmail.all-pc.net
alias admin.all-pc.net
port 80 namevhost platoonarena.net (/etc/apache2/sites-enabled/platoonarena.net.conf:1)
alias www.platoonarena.net
alias mail.platoonarena.net
alias webmail.platoonarena.net
alias admin.platoonarena.net
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name=“www-data” id=33
Group: name=“www-data” id=33

You are missing the 2nd record for www - not the cause of the issue, but you might as well put it in place.

And

sudo apachectl -t

returns OK?

im just adding the A record for the subdomain www

i guess that will take a lil while.

Syntax OK - returned

If you are using a Windows PC\Laptop - you could always add an entry into the hosts file for now - saves you waiting. I think Macs might do something similar.

I dont think i need to edit that at all - this seems to be very strange i do say!

ive been following every doc and video from JOE etc on youtube to get the grasp of Virtualmin DNS etc for a while now, never had issues before tbh

If you are running DNS\BIND on the server - then probably not.

yes bind is running but i am starting to think maybe it could be the issue.

Unlikely - if your domain is resolving at the moment, so should be OK.

Back onto Domain2 being awol - can you post up the Virtual Hosts block for Domain 2?

port 80 namevhost platoonarena.net (/etc/apache2/sites-enabled/platoonarena.net.conf:1)
alias www.platoonarena.net
alias mail.platoonarena.net
alias webmail.platoonarena.net
alias admin.platoonarena.net

If you go to Webmin >> Servers >> Apache Webserver >> Click on Global Config >> Edit Config Files >> Pull the drop down to /etc/apache2/sites-available/platoonarena.net.conf and click edit directives in file

and post up what it says there.

<VirtualHost 185.121.25.12:80>
SuexecUserGroup “#1009” “#1009
ServerName platoonarena.net
ServerAlias www.platoonarena.net
ServerAlias mail.platoonarena.net
ServerAlias webmail.platoonarena.net
ServerAlias admin.platoonarena.net
DocumentRoot /home/platoonarena/public_html
ErrorLog /var/log/virtualmin/platoonarena.net_error_log
CustomLog /var/log/virtualmin/platoonarena.net_access_log combined
ScriptAlias /cgi-bin/ /home/platoonarena/cgi-bin/
ScriptAlias /awstats/ /home/platoonarena/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/platoonarena/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
FCGIWrapper /home/platoonarena/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/platoonarena/fcgi-bin/php7.0.fcgi .php7.0

<Directory /home/platoonarena/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted

RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.platoonarena.net
RewriteRule ^(.) https://platoonarena.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.platoonarena.net
RewriteRule ^(.
) https://platoonarena.net:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
php_admin_value engine Off
FcgidMaxRequestLen 1073741824

AuthName “platoonarena.net statistics”
AuthType Basic
AuthUserFile /home/platoonarena/.awstats-htpasswd
require valid-user

Alias /dav /home/platoonarena/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName “platoonarena.net
AuthUserFile /home/platoonarena/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.0
RewriteEngine off

Just ran a quick intodns…

could PTR records be a problem, if so how do i edit again in Virtualmin?

I don’t think the lack of a PTR or an incorrect one would cause Apache issues. Would cause issues with outgoing mail.

Looking at your Virtual Hosts file - I’m looking at one of mine and nothing jumps out on yours that would suggest Apache effectively ignoring your Virtual Hosts block and displaying the default page from /var/www/html/index.html

sudo apachectl -t

Says Syntax OK?

it does - so okay i think we may be pressing the issue.

Where should the Virtual Serves be as that path you gave me has thinking as i thought when you set up a new virtual server it creates a new folder within the /home directory ??

it seems browsing the file manager i have within /home

Domain1 with its own folders and Domain2 and its own folders. Coming out of that /var also has the /var/www/html folder also with a file named index.html when downloaded and viewed gives the apache default page.

Im so confused.

That’s as expected\correct - a folder in the /home directory with the name of the admin user for the Virtual Server.

1 Like

So guessing this isnt the problem then.

Again thanks for sticking with me

If you select the Virtual Server (Domain 2) in the drop down - go to Server Configuration >> Website Options

what’s the Default Website for IP address - set to?

And

sudo apachectl -S

lists both domains?

it was set to all-pc so i set to yes.

Now from sudo apachectl -S =

VirtualHost configuration:
185.121.25.12:80 is a NameVirtualHost
default server platoonarena.net (/etc/apache2/sites-enabled/0-platoonarena.net.conf:1)
port 80 namevhost platoonarena.net (/etc/apache2/sites-enabled/0-platoonarena.net.conf:1)
alias www.platoonarena.net
alias mail.platoonarena.net
alias webmail.platoonarena.net
alias admin.platoonarena.net
port 80 namevhost all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:1)
alias www.all-pc.net
alias mail.all-pc.net
alias webmail.all-pc.net
alias admin.all-pc.net
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex mpm-accept: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name=“www-data” id=33
Group: name=“www-data” id=33

Do your Apache logs for the Virtual Server (Domain2) say anything when you try to reach the page there?