not finding doc root in VM GPL

I have a new install of VM GPL on Ubuntu 10.04.3 with one domain set up and keep getting /var/www/index.html as doc root.

This:

cat /etc/issue
Ubuntu 10.04.3 LTS \n \l

root@ecobc:/etc/apache2/sites-available# uname -a
Linux ecobc 2.6.18-274.7.1.el5.028stab095.1PAE #1 SMP Mon Oct 24 21:55:06 MSD 2011 i686 GNU/Linux
root@ecobc:/etc/apache2/sites-available# ls
default  default-ssl  ecobc.net.conf
root@ecobc:/etc/apache2/sites-available# ls ../sites-enabled
ecobc.net.conf
root@ecobc:/etc/apache2/sites-available# grep root ecobc.net.conf
root@ecobc:/etc/apache2/sites-available# grep Root ecobc.net.conf
DocumentRoot /home/ecobc/public_html

all looks ok to me.

Any ideas?

Dave

Howdy,

So it looks like you just have that one file in your /etc/apache2/sites-enabled directory?

A few other questions then –

Are you by chance behind a NAT router?

Also, if you go into System Settings -> Re-Check Config, does it detect any problems?

-Eric

yes only one file
no NAT, datacenter hosting
re-check no problems except quotas not enabled which is ok and due to virtualization

Dave

ps, many thanks for all your help over the past year, have a good holiday (if you ARE taking time off…:wink:

Howdy,

If you look at the top of the file /etc/apache2/sites-enabled/ecobc.net.conf, you should see an IP address in the “VirtualHost” line.

Then, if you run “ifconfig”, you should see a list of your server’s network interfaces and their IP addresses.

Is the IP address in the ecobc.net.conf file one of the IP addresses setup on your server?

-Eric

like this:



root@ecobc:/etc/apache2/sites-enabled# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:19436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19436 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2643249 (2.6 MB)  TX bytes:2643249 (2.6 MB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:127.0.0.2  P-t-P:127.0.0.2  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:17849 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17293 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1303130 (1.3 MB)  TX bytes:2154111 (2.1 MB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:69.90.112.212  P-t-P:69.90.112.212  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

and the address in virtual host section is 127.0.0.1

69.90.112.212 is the corerct external IP address

Dave

Okay, so it seems to have gotten confused somewhere along the line…

It should never used 127.0.0.1 in the Apache config, as that’s not the address any incoming requests should be coming on.

Is it possible that during the setup of Virtualmin, that the venet0:0 interface wasn’t online?

In any case – if you go into System Settings -> Virtualmin Config -> Network Settings, what are “Network interface for virtual addresses”, “Default virtual server IP address”, and “Default IP address for DNS records” set to?

However, you can manually update the IP in the Apache config for that VirtualHost – make that your external IP, and then restart Apache.

-Eric

shows:

network interface as vnet0

default server IP address is from network interface

default IP address is automatically detected

I’ve changed the virtual host setting as you suggest and it works fine

d

The IP address that the venet0 interface has is “127.0.0.2” – which isn’t what you’d want it using.

I’d suggest changing that to use venet0:0, which has your external IP address.

-Eric