Create new Virtual Server for my 2nd domain crash my 1st domain

22 posts / 0 new
Last post
#1 Tue, 07/10/2012 - 08:20
anthonyinit2012

Create new Virtual Server for my 2nd domain crash my 1st domain

Hi, I just bought my 2nd domain and i want to install wordpress but before that i need to create my 2nd virtual host so i did it, once i successfully create the 2nd host i cannot browse my 1st site.. it give apache error, Forbidden / You don't have permission to access / on this server.

what is wrong here.. how i will setup my 2nd site.

Thank you

Tue, 07/10/2012 - 09:10
andreychek

That "Forbidden" error suggests that it's looking for a website in a directory that doesn't contain any web files.

Can you verify that the web files still exist in the public_html folder of your first domain?

Also, you may want to try uploading a simple index.html file into the public_html folder of your second domain, just to see if for some reason Apache is trying to load that.

-Eric

Tue, 07/10/2012 - 23:00
anthonyinit2012

Yes files exist in the folder public_html http://i48.tinypic.com/w7eesk.jpg also site is running normal. but once i create 2nd server this crash. now i delete my 2nd server. and i dont have any 2nd domain folder.

plz help im lost here :)

Wed, 07/11/2012 - 03:12
anthonyinit2012

hi, i just create a 2nd virtual server and upload index.html to 2nd server public_html folder and browse with my server xxx.xxx.xxx./index.html and it work however when i try to browse my 1st domain it shows the same index.html i upload to my 2nd domain..

Thank you

Thu, 07/12/2012 - 01:47
anthonyinit2012

Hello, please i need some help here...

Thu, 07/12/2012 - 03:06
ronald
ronald's picture

Hi Can you supply the domainnames please?
It may be that Apache is looking at the second domain when you call the server by IP.
You need to check if the first domain is also the default domain that Apache is looking for.

If you are running Ubuntu/Debian then it has to do with sites-enabled I think.
With Centos you can just look inside the virtualhost container to see which domain is mentioned first.

Thu, 07/12/2012 - 03:42
anthonyinit2012

Hi, I'm using Debian, http://www.djtonyd.net before when i use virtualmin nothing happen when creating 2nd or 3rd virtual server unfortunately i had to reinstall everything after that all this issue.

Everything is fine when creating 2nd virtual server, i can see the new folder created for my 2nd domain and BIND DNS Server records etc all there but my 1st domain crashes.

Thank you

Thu, 07/12/2012 - 04:47
ronald
ronald's picture

that domainname is parked and not leading anywhere.
intodns.com suggests that the IP is 74.206.101.77 but there seems no virtualmin behind it.

with more information it may be possible to troubleshoot this.
What Debian distro is used?
did you install with the install.sh ?
what is the IP?
Which domains have been created through virtualmin?
What happens if you do a Re-Check Virtualmin Configuration?
Have you registered the DNS IP's at the registrar or are you using the DNS server from your registrar?
If you run your own dns server, what is the domain used?

What exactly do you mean by 1st Domain is crashing? Is Apache crashing or do you see the 2nd domain when you call the server by IP?
What is in the log about this?

Thu, 07/12/2012 - 05:41 (Reply to #8)
anthonyinit2012

Hi,

Ok lemme give all the step i did,

01)after reinstall Debian 6.0 i install Virtualmin with install.sh and create my 1st virtual server with my friends domain name http://www.seekdl.com after i went to my domain provider control panel and set A record with my server IP 91.205.174.80. once DNS change everything point to my server perfectly and site was online without any issue.

02) i got the 2nd domain to host, so i create my 2nd virtual server with 2nd domain name http://www.djtonyd.com as soon as i create this server 1st domain crashes when i browse the site only i can see Apache error message : Forbidden You don't have permission to access / on this server.

so i did remove my newly created server (no#2) after remove that server i browse my 1st domain (seekdl) and it back online without any error.

Since i cannot create my new virtual server i had to setup djtonyd.net as parked with default A records with domain provider. but if i set my server IP it will point to my 1st domain (seekdl)

Apache error not showing anything (/var/log/apache2/error.log)

Re-Check Virtualmin Configuration? show no error all good.

Thank you

Thu, 07/12/2012 - 08:28
andreychek

Howdy,

You may also want to review the error logs for the domains in question -- those are available in $HOME/logs/error_log.

However, is your server behind a NAT router?

That is, is the IP address on the primary interface of your server an internal IP address?

It almost sounds as if you have some sort of IP address mismatch, which could cause Apache to get confused as to what domains it's hosting.

-Eric

Thu, 07/12/2012 - 08:53 (Reply to #10)
anthonyinit2012

Hi, home/logs/error_log

[Thu Jul 12 15:41:16 2012] [error] [client 66.249.66.28] File does not exist: /home/seekdl/public_html/search [Thu Jul 12 15:41:20 2012] [error] [client 91.72.16.26] File does not exist: /home/seekdl/public_html/templates/seekdl/images/maintitle.png, referer: http://www.seekdl.com/templates/seekdl/css/style.css [Thu Jul 12 15:41:57 2012] [error] [client 66.249.66.28] File does not exist: /home/seekdl/public_html/search [Thu Jul 12 15:43:13 2012] [error] [client 66.249.66.28] File does not exist: /home/seekdl/public_html/search [Thu Jul 12 15:43:54 2012] [error] [client 66.249.66.28] File does not exist: /home/seekdl/public_html/search

These keep repeating.. thats all.

for your other question i don't know how to answer, i have no idea how to check them... is there anything i can do in virtualmin CP

i think you are right this is some ip mismatch issue, because this never happened before when i had 2 other domain hosting. this only happened after i reinstall virtualmin.

Thank you.

Thu, 07/12/2012 - 09:41
andreychek

What is the output of the command "/sbin/ifconfig"?

-Eric

Thu, 07/12/2012 - 09:55 (Reply to #12)
anthonyinit2012

Hi hi,

please check this here http://i45.tinypic.com/2d7se2o.jpg

Thank you

Fri, 07/13/2012 - 06:30
anthonyinit2012

Hi andreychek

have you check the result i post? any help to fix

Thank you

Fri, 07/13/2012 - 07:11
andreychek

I don't see anything abnormal with your /sbin/ifconfig output -- I was originally wondering if it would show that your server was behind a NAT router, but it doesn't appear that way.

Just yesterday I rewrote the documentation on how to troubleshoot issues where the wrong website shows up when browsing to a domain -- that seems similar to what you're experiencing there.

Could you take a look at the documentation here, and see if anything stands out to you:

https://www.virtualmin.com/documentation/web/troubleshooting

Fri, 07/13/2012 - 07:17
anthonyinit2012

Hi, believe it or not, i did read that about 30min ago and follow necessary steps but i don't see anything wrong.

by the way in my apache2.conf i see this at the bottom

Include the virtual host configurations: Include sites-enabled/ NameVirtualHost 91.205.174.80:80

Is this correct

Fri, 07/13/2012 - 08:03
andreychek

Yup, that NameVirtualHost line is correct.

And then, the other key is that in /etc/apache2/sites-enabled/DOMAIN_NAME.conf, you'd want to make sure that the "VirtualHost" lines in there contain that IP address, and not a different address.

You may have done that already if you read through those docs, but that's the important part of them - -to make sure that the correct IP address is in your Apache config.

Also, you'd want to make sure that none of the .conf files contain something like this:

VirtualHost *:80

You don't want a "*", you always want an actual IP address.

-Eric

Fri, 07/13/2012 - 08:19 (Reply to #17)
anthonyinit2012

Yes everything looks normal in that file also... i really don't know how to fix this again i try to create 2nd virtual server as soon as i create that, my 1st site crash, still the same error when browsing that site.

VirtualHost 91.205.174.80:80 SuexecUserGroup "#1000" "#1000"

anything you could think of please

Sat, 07/14/2012 - 04:35
ronald
ronald's picture

I still dont see how a site crashes..
Can you just create 2 domains and leave them there, then post the domains so some of us can actually see what's going on?

Sat, 07/14/2012 - 05:19
anthonyinit2012

Hi there to both of you, finally i fixed the error, thanks to andreychek, 1st it didn't click my mind to check default apache2 in (/etc/apache2/sites-enabled) since i was focusing on my 2 sites conf file, i got angry and did a reinstall but problem was still there, got fedup and start to look for all apache related config file starting with /etc/apache2/sites-enabled/000-default and i found *:80 so i replace it with my IP and restart my server boom it fixed. no more crashing. now i'm able to install wordpress and run the site without any issue.

so this simply *: misconfiguration gave me days of trouble.. i almost bang my self hehe.

Thank you andreychek and ronald for supporting me.

Sat, 07/14/2012 - 14:51
andreychek

Thanks for letting us know how you fixed that, I updated the documentation to handle that issue as well.

-Eric

Sat, 07/14/2012 - 15:43 (Reply to #21)
anthonyinit2012

You are most welcome, sure thing you have to update the guide so that others can see. this fix will help many others. :)

Take care

Topic locked