HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Problems with client websites (http://www.howtoforge.com/forums/showthread.php?t=39671)

jeeva 27th September 2009 14:21

Problems with client websites
 
Hi

Using ISPconfig3 + debian5 preconfigured-preinstalled distro from OVH.co.uk.

I've created a user, e.g. user1
then I've created a website for user1, e.g. domain1.com
created a shell for user1 with no jail.
setup the DNS, etc.

So when I go to domain1.com, i get

Code:

Welcome to your website!
This is the default index page of your website.

This file may be deleted or overwritten without any difficulty. This is produced by the file index.html in the web directory.

For questions or problems please contact support.
Powered by ISPConfig

When I FTP or SSH into user1. I get my directory list of /web /home /cgi-bin /etc /ssl /tmp /var, etc

cd web
/web$ rm -rf *
now /web is blank
I upload my website to /web, which is ofcourse full of files now including a new index.html & index.php.

when i go to domain1.com, I still get the "Welcome to your website - ISPconfig", eventhough I've replaced the files.

What have I done wrong?

Regards,

tyre 27th September 2009 20:06

is domain1.com the only site on the server? Or is a different domain (e.g. domain.com) the main server domain.

The reason I asked is I just had a problem similar, in that i had domain.com, I would add domain1.com, and domain1.com would show domain.com content. Change index.html on the domain.com to see if this is indeed the case.

The problem was, as till pointed out, that I didn't have the server's IP setup in the system settings, and so since I had * selected as the IP - it was resolving to the main domains page, and not that of the user/domain that i had created.

Stown 28th September 2009 11:33

How do we even can setup a main domein? I have this same problem, i have now domains that point with the dns to my ispconfig server without the created domain in ispconfig, when i go to that domains, i get eertwegh.nl that is one of the 4 domains i setup in ispconfig.

How can i change the main domain and when a domain points to my server ip it should be the message "Apache works" right?

Mccy_McFlinn 28th September 2009 13:11

Hello Stown,

It all depends how you've configured apache. The default index.html for apache is the "it works!" page.

It sounds like you've assigned the external IP address of your server to one of the sites you're hosting (eertwegh.nl). This has made that site the default site to be displayed if anyone navigates to the IP address of your server or uses a domain name that has a DNS record pointing to the server with no site configured as is your setup below.

I'd check the default config file in /etc/apache2/sites-available. Make sure that it shows <Virtualhost *:80>. Then check the eertwegh.nl vhost file in the same directory. Make sure it shows <Virtualhost *:80> as it sounds like it's probably showing <Virtualhost 1.1.1.1:80> (where 1.1.1.1 is your external ip address).

Assuming that all host files show *:80 then the default index page will be displayed when navigating to the IP address of the server. You might want to change the default page to something more descriptive or personalised than the "it works!" page but that's just my personal choice.

Any problems or questions then let me know.

Stown 28th September 2009 14:11

Okay thank you. But what if i want that eertwegh.nl only works on 1.2.3.4 and not on 1.2.3.5 and 1.2.3.6? This way i am creating a main domein or not? That should not be possible, looks like a bug or not?

Mccy_McFlinn 28th September 2009 14:33

This isn't a bug, this is how Apache is designed. I'd have to do some reading with regards to the finer details as I have far more experience with IIS. I'll check up and find how to specify a default domain for specified IP Addresses in apache and get back to you shortly.

Stown 28th September 2009 15:08

Alright, now i did what you said. I edited eertwegh.nl from 1.2.3.4 to * and now the 1.2.3.4 points to the next domain you know. Now i did this with al the domains from 1.2.3.4 to * and now 1.2.3.4 points back to eertwegh.nl so it is no difference.

Mccy_McFlinn 28th September 2009 15:10

Ok, what does the default file say in /etc/apache2/sites-available. Make sure to check sites-enabled for the default file too - it may be named 001-default.

Stown 28th September 2009 15:13

How do you mean check the default file? I have only the domain vhosts and ispconfig vhost

till 28th September 2009 15:15

Apache is always using the first vhost for a given IP address if you enter just the IP. Which one is used first depends on the domain name as apache is sorting it alphabetically.

So the easiest way to have a specific vhost for an IP, add a new website with a domain name that is definately the first one like: aaaaaaaaaaaaa.tld and upload the content there that shall be shown when the IP is used.


All times are GMT +2. The time now is 08:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.