The Wrong Site Shows Up

15 posts / 0 new
Last post
#1 Tue, 12/16/2008 - 17:54
flameproof

The Wrong Site Shows Up

ok, there is a FAQ for this here:

http://www.virtualmin.com/documentation/id,troubleshooting_common_problems/

in Virtualmin>Module Config>Server Settings I have:

Network interface for virtual addresses Detect automatically Default virtual server IP address From network interface Default IP address for DNS records Same as virtual server IP

The behavior is:

http://www.domain.com is listing the content of: /var/www/html/ (NOT /var/www/html/domain/ ) - but should list /home/domain/public_html/

Strangely, http://webmail.domain.com is working correctly.

Where is the error?

PS: I installed webmin and virtualmin, but I am not sure my ISP was using it when making 2 domains live a few hours ago.

Maybe there is also something wrong with my general installation, when I do: virtualmin>system settings>

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.

.. your system is not ready for use by Virtualmin.

Ok, when I add 127.0.0.1 in the DNS list I get the next error in the mail setup....

Tue, 12/16/2008 - 18:41
Joe
Joe's picture

<div class='quote'>http://www.domain.com is listing the content of: /var/www/html/ (NOT /var/www/html/domain/ ) - but should list /home/domain/public_html/</div>

VirtualHost and NameVirtualHost have to match up. If you have multiple NameVirtualHost directives it can also cause breakage...especially if one is for *:80 or simply *

<div class='quote'>Ok, when I add 127.0.0.1 in the DNS list I get the next error in the mail setup.... </div>

What error?

--

Check out the forum guidelines!

Tue, 12/16/2008 - 21:03 (Reply to #2)
flameproof

<div class='quote'>Any reason you didn't use the automated install.sh script?</div>

Can I still run it now? My 2 domains don't work anyway. Seems can't do much harm.... if &quot;yes&quot; - how?

Wed, 12/17/2008 - 05:19 (Reply to #3)
flameproof

(a few hour later)

I reinstalled the whole VPS. This time I just use the &quot;wget install.sh&quot; from above.

In Webmin&gt;Server&gt;Apache&gt;Global configuration - I set /home

Then I created 2 virtual server with:

/home/domain1/public_html
/home/domain2/public_html

created the directories with Filezilla
restart apache

Domain1 works fine, Domain2 points to Domain1 - that's Problem 1

Now a look at Virtualmin:

Virtualmin&gt;Create Virtual Server - I try domain1.com with &quot;Shared, on IP&quot; (the VPS IP is shared for all domains). Now I get error: <i> Failed to create virtual server : New virtual server has no IP address! Perhaps Virtualmin could not work out the system's default IP.</i>

OK&lt; when I do virtualmin&gt;System Information&gt;re-check config.... I get nearly all OK, except: <i>No Ethernet interface could be automatically found on your system. Use the module configuration page to set the interface manually.

.. your system is not ready for use by Virtualmin.</i>

(and suddenly I can't login to https:....:10000 )

Wed, 12/17/2008 - 05:23 (Reply to #4)
andreychek

Ahh, yeah, that error occurs on some VPS systems out there.

If you run an &quot;ifconfig&quot; -- which interface there contains your Internet-facing IP address (as opposed to 127.0.0.1 and such)? It's normally something like &quot;eth0&quot; or so, but is probably a little less usual on your VPS there.

Then, go into System Settings -&gt; Module Config -&gt; Server Settings, and set that interface name in the field labeled &quot;Network interface for virtual addresses&quot;.
-Eric

Wed, 12/17/2008 - 13:46 (Reply to #5)
flameproof

I can access :10000 again after restarting the VPS. After reinstalling it's on httpS, before it was on http... But it works, or better, starts.

For IFCONFIG:

[code:1][root@vps- ~]# 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:4294967289 errors:0 dropped:0 overruns:0 frame:0
TX packets:4294967289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21 (21.0 b) TX bytes:21 (21.0 b)

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.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255. 255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:219 errors:0 dropped:0 overruns:0 frame:0
TX packets:231 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:36709 (35.8 KiB&Acirc;&laquo;&Acirc;&raquo;) TX bytes:124532 (121.6 KiB&Acirc;&laquo;&Acirc;&raquo;)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:216.***.***.189 P-t-P:216.***.***.189 Bcast:216.***.***.189 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1[/code:1]

What does it mean?

Wed, 12/17/2008 - 13:50 (Reply to #6)
andreychek

It looks like the interface associated with your Internet-facing IP is &quot;venet0:0&quot;.

If it's still unable to determine what network interface to use, I'd go ahead and put venet0:0 into the Module Config section I mentioned above, and see if that corrects the problem.
-Eric

Wed, 12/17/2008 - 15:48 (Reply to #7)
andreychek

I'm glad it's working!

<div class='quote'>
PS: the &quot;quote&quot; and &quot;edit&quot; functions don't work in this forum.
</div>

Indeed, it's often difficult to distinguish between this forum software and a medieval torture device.

Joe's hard at work on that though, and new forum software with working buttons should be available soon :-)

Have a good one!
-Eric

Tue, 12/16/2008 - 20:15
flameproof

There I get the error:

<i> Sendmail is only accepting SMTP connections on the following ports : 127.0.0.1 port smtp. Email from other systems on the Internet will not be accepted. This can be changed in the Sendmail Mail Server module.

.. your system is not ready for use by Virtualmin.</i>

Where do I check NameVirtualHost and NameVirtualHost?

BTW, all my domains share my VPS IP

Tue, 12/16/2008 - 20:29 (Reply to #9)
Joe
Joe's picture

Any reason you didn't use the automated install.sh script? Installing a full-featured hosting system manually can be very time consuming...and if you don't know a lot about system administration, it can also be very intimidating.

<div class='quote'>Where do I check NameVirtualHost and NameVirtualHost?</div>

In the Apache configuration file. You can also check them in the Apache module in Webmin, but searching with the Apache configuration files is usually faster for this particular task.

--

Check out the forum guidelines!

Tue, 12/16/2008 - 21:31
flameproof

OK, found it:

% wget http://software.virtualmin.com/gpl/scripts/install.sh
/bin/sh install.sh

That went flawless with the only error related to clamav.net...

However, myvps#:10000 doesn't work now and I get a bad page error.

Maybe had to delete webmin first? Webpages still work (in the wrong place though)

What next? I am thinking of reinstalling the whole VPS from scratch. It's CentOS5.2 with Apache etc. pre-configured. Shall I do that?

Wed, 12/17/2008 - 05:06 (Reply to #11)
andreychek

Sounds like you ran the install.sh before Joe got back to you -- the answer would have been &quot;If you run it now, it'll cause all sorts of issues on a live system&quot; :-)

However, if starting over is an option, I'd highly recommend it.

The install.sh works great on a freshly installed system, so if you start over on your VPS, you'll be in really good shape!
-Eric

Wed, 12/17/2008 - 15:43
flameproof

<div class='quote'>It looks like the interface associated with your Internet-facing IP is &quot;venet0:0&quot;.
</div>

I did: virtualmin&gt;System Settings&gt;Module Config&gt;Server Settings @ &quot;Network interface for virtual addresses&quot; I added: &quot;venet0:0&quot;

After that the virtualmin recheck was &quot;ok&quot;. Then I deleted the virtual servers in Webmin and created them again in virtualmin &gt; success!

Correct sites also show up now.

A little thing that puzzled me, I have domain1.com.hk and domain2.com, in /home/ the appear as:

/home/domain1/
/home/domain2.com/

No real issue though and I leave it like that.

Thanks for your support!

PS: the &quot;quote&quot; and &quot;edit&quot; functions don't work in this forum.

Wed, 12/17/2008 - 16:44
flameproof

I feel like I am really not in the position to give any advice at all, but with my near zero knowledge about servers, Linux etc. I had phpBB installed and setup in no time.

Ok, the tricky part are probably all the existing messages....

Sun, 07/25/2010 - 13:23
EkUser

I changed "Network interface for virtual addresses" to "etho" , now I can create more Virtual Machine without problem

Topic locked