Virtualmin only shows Apache Default page

HI Guys.

I recently needed to re-setup my virtualmin server(the server stopped updating)… in order keep my clients sites running during this transition - I setup a new virtualmin installation in my shop on a inhouse server. I then moved all the the sites to it… this process worked perfectly and i have my sites now running on a inhouse server.

I use a godaddy VPS i have for a long time. I rebuilt the server (destroyed and rebuilt to server is fresh) and readded virtualmin to it. All “seemed” fine.

I added the first site back onto goddaddy server but no matter what things i have tried… i cannot get http to route to the correct public_html folder in home…all i see is apache’s Default page. if i connect with ssh to the new webserver using its credentials i can browse to and have permissions to the sites home folder. Nothing i have tried seems to work.

since that point i have rebuilt the server and reinstalled virtualmin no less then 15 times. I have spent days trying to farm out why i cant see the correct site for the domain. I almost suspect godaddy did something to stop me from using virtualmin.

Im reaching out to you the vitualmin community for help or suggestions. I am at the end of my rope. I at one point and time thought i understood how to set this software up but now i dont know…

I am beaten and bruised from trying to get this to work. I reach out to you virtualmin Jedi’s… why cant i get virtualmin to route to the correct domains and stop it from always showing the default apache page?

a Frustrated Icon :frowning:

Welcome @Icon,

Long shot - have you tried changing the default website for the IP to see if apache will display a different website as default?

If you select the domain you want as the default from the dropdown list on the top-left of Virtualmin, click Server Configuration → Website Options, and select “Default website for IP address”

Won’t fix your issue but changing the default website in Apache might help you work out where the issue\s lie if the change works or doesn’t.

HIH

Dibs

Hi thank you for responding.

When you asked i had only setup one domain. So it considered the 1 domain default… To verify i added a second domain to virtualmin.
i set the initial domain as default and then checks both domains…saddly both domain show the apache default page still. I am open to more suggestions.

Icon

Might be a daft question - but both Virtual Servers\Domains have some kind of content? Even a Hello World index.html page?

And you still get the default Apache page when you set the 2nd Virtual Server’s domain as the default?

Edit: Do the following commands give any errors

apache2ctl -t
apache2ctl -S

1st one checks the config\syntax & 2nd tests the virtual hosts definitions.

Also - both your sites are in sites-enabled?

Dibs

There is no such thing as a daft question :slight_smile: I did not have anything in their root folders… so i logged into both respective domains and created a index.html with a “hello im here” in both of the public_html folders. unfortunately the issue remains unchanged.

I tried the commands you gave me and i do get a error.

AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/0-mydomainiused.com.conf:
SuexecUserGroup configured, but suEXEC is disabled: Invalid owner or file mode for /usr/lib/apache2/suexec

so i went to /usr/lib/apache2/suexec

i see this :
https://gyazo.com/0106db28491fcda600d842f499cefc49

i compair this with my in shop working server - the permissions “appear to be the same”

what would be the correct resolution for the above error?

edit: yes both sites are inside sites-enabled

@Icon - I had that error too. Seems someone had it previously - https://www.virtualmin.com/node/41052

In the end I executed

chmod 4755 /usr/lib/apache2/suexec-custom

and apache started\worked for me. Would suggest you read thru the above post and do the checks suggested. Or you could give it a go - considering you’ve already had a fair few goes. LOL

Edit: the error is on line 2 of /etc/apache2/sites-available/0-mydomainiused.com.conf . Just comment it out if you want for now. Then check the config (those 2 commands) and if all is well - restart apache and see if your test pages display (hopefully they are slightly different so you know with domain’s test page you are actually looking at.)

Then undo the comment and go thru that post I referenced.

HIH

Dibs

i chmoded that folder and now when i issue

apache2ctl -S

it tells me this:
apache2ctl -S
AH00112: Warning: DocumentRoot [/home/mydomainused/public_html] does not exist
AH00526: Syntax error on line 21 of /etc/apache2/sites-enabled/mydomainused.com.conf:
Wrapper /home/mydomainused/fcgi-bin/php7.0.fcgi cannot be accessed: (13)Permission denied
Action ‘-S’ failed.
The Apache error log may have more information.

those folder do exist though.
im confused… it had permission to make those folders but it doesnt have permission to access them?
i stat the home folder and the folder permissions seem to be identical with my working inhouse server except that the Godaddy VPS shows a -0700 instead of a -0500

image on left Godaddy image on right inhouse server

https://gyazo.com/9aa92a09e68450f864e4bdf4d41e0713

the permissions seem the same - tried looking up what the -0700 is but i didnt find anything helpful

edit : i did go in and stat the two domains to see what permissions existed and if they were different. both domain folders were owned by the appropriate user for the domain…

there is nothing in the apache log either. I really dont know where to go from here. I dont get why i can install on a fresh 16.04 with same kernal locally it will work… but it doesnt on the godaddy VPS.

looking at line 21 and 22 i see:
FCGIWrapper /home/mydomainused/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/mydomainused/fcgi-bin/php7.0.fcgi .php7.0

they do exist and are owned by the user for the domain. To me i would think if its using the correct user they would/should have permission.

Did you execute with sudo privileges?

Assuming your reference of 16.04 is to Ubuntu 16.04 (and not a typo), I wouldn’t build on that. It goes EOL (I think) next April.

Dibs

Well,

honestly im on the same page as you. Its my preference to use 18.04 (especially since 20.04 is starting to hit the scene.)

godaddy only offered 16.04 as a VPS option so when i built my inhouse server i kept it the same revision for simplicity… Inhouse 16.04 worked brilliantly… so through all this testing i used my inhouse as my base comparison for out in godaddy VPS land.

if you think i might have better success upgrading the VPS to 18.04 i will try that…

edit: using sudo i dont get the error. so im even more confused as there is no errors now.

im going to rebuild the VPS again… and upgrade it to 18.04 then install virtualmin and see what happens.

The error you got was due to you not running the command with sudo.

So if both commands (as sudo) are returning no errors - restart apache and see if you can access the test html pages on either domain? (making sure both pages are slightly different, i.e. Domain 1 says “I am here - domain1” & Domain 2 says “I am here - Domain2” or similar).

My advice would be to resolve the issue with Apache and once the test html pages display as expected - then perhaps rebuild\upgrade.

Otherwise you run the risk of doing many things but ending up in the same place.

Dibs

OK… because i was concered that some of my troubleshooting before i posted on the forum might be hampering my resolution…

I went ahead and rebuilt the server… and reapplied everything we have done in the above messages.

so now im to the same point with the same issue… so it wasnt anything i had done before.(i had to be sure i didnt do something stupid.)

each website has a simple index.html domain1 is set as default for the ip

apache2ctl -S

returns no errors. and i see info for the default domain.
i can ssh with each of the users names and folder permissions see correct each was able to create their own unique index.html

so i am now where i left off from before… minus any radicle changes i might have made to the server before you started assisting me :slight_smile:

what would be a next step?

icon

More for my benefit, just so I don’t misunderstand - you

  1. Spun up a VPS
  2. installed Virtualmin (using the std install script
  3. created a Virtual Server 1 for Domain 1
  4. created a Virtual Server 2 for Domain 2
  5. Dropped in a simple index.html into the public_html folders of each Virtual Server.
  6. Each index.html is slightly different, i.e. looking at one, you know which domain in belongs to
  7. no error when running (from CLI) sudo apachectl -t
  8. no error when running (from CLI) sudo apachectl -S

Assuming the above is true - can you post up the Virtual Host blocks for each domain?

For testing purposes - for each Virtual Server, just enable HTTP, i.e. un-tick everything else. Also worth Validate Servers - just to make sure nothing is amiss.

Dibs

ok,
this is domain 1

ServerName domain1.com
ServerAlias www.domain1.com
ServerAlias mail.domain1.com
ServerAlias webmail.domain1.com
ServerAlias admin.domain1.com
DocumentRoot /home/domain1/public_html
ErrorLog /var/log/virtualmin/domain1.com_error_log
CustomLog /var/log/virtualmin/domain1.com_access_log combined
ScriptAlias /cgi-bin/ /home/domain1/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/domain1/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/domain1/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/domain1/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/domain1/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.domain1.com
RewriteRule ^(.*) https://domain1.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.domain1.com
RewriteRule ^(.*) https://domain1.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824

this is domain 2

ServerName domain2.com
ServerAlias www.domain2.com
ServerAlias mail.domain2.com
ServerAlias webmail.domain2.com
ServerAlias admin.domain2.com
DocumentRoot /home/domain2/public_html
ErrorLog /var/log/virtualmin/domain2.com_error_log
CustomLog /var/log/virtualmin/domain2.com_access_log combined
ScriptAlias /cgi-bin/ /home/domain2/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/domain2/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/domain2/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/domain2/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/domain2/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.domain2.com
RewriteRule ^(.*) https://domain2.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.domain2.com
RewriteRule ^(.*) https://domain2.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824

and this is all i have ticked enabled on both domains

my post got hidden… i guess they system didnt like a gyazo screenie., the link to the screenie is gone… it was a pic of the items checkmarked…

i hope i gave you the correct stuff. I didnt bother hiding the domain because well its default non critical info

What you gave looks ok. I assume you have the following 2 line at the top,

<VirtualHost 11.22.33.44:80>
SuexecUserGroup "#1001" "#1001"

and the following line at the end

<VirtualHost>

Dibs

Yes,

They both do. They point to the internal IP of the VPS. I grabbed those from inside “Edit Directives” for the domain in Vmin it held back the IP and the open and close Virtualhost tags. anything else you wish to see?

You mean the externally addressable IP - one that you can ping (usually) from your PC\Laptop?

Well no currently they point to the the internal IP of the vps. This is something that is identical for my in shop server. its Vhost blocks at top, all point at 10.0.0.40(internal IP) which is not a publicly accessible IP…

godaddy vps
IP addresses 10.217.12.107 (72.167.223.145 externally) this is identicle in configuration to my

working inshop server which is
IP addresses 10.0.0.40 (97.83.224.140 externally) <— this is my inhouse setting and it works for all my pages i have setup.

i can change those IP’s but i suspect since the in shop server is operating using the same thing. That change might not affect much

hey this may also help me this thread :slight_smile: So i deleted my Virtual Servers to start again. I have before easily installed Wordpress via the Script installer and got to a visable install wordpress page, the problem i am facing right now is,

I am receiving error 404 not found.

The requested URL was not found on this server.

Apache/2.4.25 (Debian) Server at xyzxyz.net Port 80

i think this could be also a similar issue if not i will start a new thread.

when i click the install link…

An in shop server, i.e. no different to one at home - will usually be behind a NAT\Router. The Router has the external\WAN IP and internal devices have a non-routable IP. One external IP can be used by numerous devices using NAT.

A VPS in a data center should have (primarily) an addressable IP. It may also have a private IP - perhaps for connecting “internally” to other VPSs. But one IP goes with one VPS.

Best start a new thread - not being awkward. Just so wires don’t get crossed.

HIH

Dibs

1 Like