ISPConfig3 | shared IP

Discussion in 'General' started by Hans, Apr 1, 2010.

  1. Hans

    Hans Moderator ISPConfig Developer

    When i visit a non-existing subdomain which is on an ISPConfig2 server, the message "Shared IP" within the web browser appears. If i do the same on an ISPConfig3 server this is not the case. The fist website in alphabetic order seams to appear. What do i have to do, so that i get the same as on an ISPConfig2 server?
     
    Last edited: Apr 1, 2010
  2. bajodel

    bajodel New Member

    ..take a look at your /var/www/index.html file (..you should have one)
    In all my setup i've customized it with a standard default page.

    bye..

    bajodel
     
  3. Hans

    Hans Moderator ISPConfig Developer

    I have a default index.html file within /var/www already, but that's no solution and is not functioning.

    Further information:
    I do not use my own DNS-servers.
    When i create a wildcard or "*" CNAME as DNS-record at my ISP, the Apache webserver shows the fist website in alphabetical order.

    Example:
    I host the website on www.mydomain.com on the ISPConfig3 server. When i visit the non existing subdomain test.mydomain.com then the first website appears (alphabetical order, regarding the domain name). So my question is: how can i avoid this behaviour. As said before, on an ISPConfig2 server in such situation, the SHARED IP message appears, which is what i want. How can i do this on an ISPConfig3 server?

    The reason i want to have the wildcard CNAME so, the client can easily create subdomains within ISPConfig3.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3 has no shared IP page. If you get such a page, it is defonaztely not from ispconfig 3. Looks as if you access a ispconfig 2 server and not the ispconfig 3 system.
     
  5. Hans

    Hans Moderator ISPConfig Developer

    Thanks Till, but that is not what i mean.
    I know there is no shared IP page. But i wish there was one, as i do not like the behaviour that if a subdomain does not exitst, the first website shows up (in alphabetical order, regarding domain names created on the ISPConfig3 server).
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. Hans

    Hans Moderator ISPConfig Developer

    Thank you Till, that's exactly what i was looking for!
     
  8. Hans

    Hans Moderator ISPConfig Developer

    Thanks Till,

    Thanks for the information, but i see that there are default vhost files available already on an ISPConfig3 server.
    These files are:
    /etc/apache2/sites-available/default
    /etc/apache2/sites-available/default-ssl

    Correct me when i'm wrong but i think that the first website (domain in alpabetical order) is shown in the browser, because both of these files contain:
    DocumentRoot /var/www/ and <Directory /var/www/.

    So what i did was: i created the directory /var/www/default containing my index.html page.
    And changed DocumentRoot /var/www into DocumentRoot /var/www/default and <Directory /var/www into DocumentRoot /var/www/default within the files /etc/apache2/sites-available/default and /etc/apache2/sites-available/default-ssl.

    However nothing happend. What am i doing wrong?
     
    Last edited: Apr 2, 2010
  9. dclardy

    dclardy Member

    Once you get this setup, can you share it with me? I have been looking for the same thing for a while now!
     
  10. bajodel

    bajodel New Member

    ..ok let's try to create a ISPC2 'similar behaviour'..
    (commands as root '#')

    - make /var/www/sharedip folder
    - create a /var/www/sharedip/index.html default page
    - edit (or create) /etc/apache2/sites-available/default

    -----------------------------------
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/sharedip/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/sharedip/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    </VirtualHost>
    -----------------------------------

    - # cd /etc/apache2/sites-enabled
    - # ln -s ../sites-available/default 000-default
    - restart apache..

    At this point, ..for me, it's working.

    bye..

    bajodel
     
  11. Hans

    Hans Moderator ISPConfig Developer

    Thanks bajodel, i guess that's it. I will set it up that way as well.
     
  12. Hans

    Hans Moderator ISPConfig Developer

    @bajodel,
    Thanks for your detailed explanation but unfortunately it did nothing.

    In fact i did the same, as the default and default-ssl files already exists within /etc/apache/sites-available with a symlink to /etc/apache/sites-enabled.

    However what we've setup should work, but for an unknown reason, Apache still serves the first website (on alpabetic order) which is created with ISPConfig3.

    I guess i still miss something.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try the default vhost setup that is described on the apache website (see my link above). Ituses _default_ and not * in the vhost definition.
     
  14. Hans

    Hans Moderator ISPConfig Developer

    Thanks Till,
    But using <VirtualHost _default_:*> instead does not make any difference at all either. :confused:
     
  15. ressel

    ressel Member

    i would also like to know the solution.
     
  16. bajodel

    bajodel New Member

    Hans.. could you please show here /etc/apache2/sites-available/ folder in detail..
    (# ls -l /etc/apache2/sites-available/) ..and your distro/version ..

    I'm on debian lenny (perfect setup..) and latest ISPC. What i've written in my previous post has worked well fom me.

    bye..

    bajodel
     
  17. Hans

    Hans Moderator ISPConfig Developer

    The output of ls -l /etc/apache2/sites-available/ is for every single vhost:

    -rw-r--r-- 1 root root <number> <timestamp> <name.vhost>

    (I do not mention all the vhost files here).

    I use Debian Lenny with ISPConfig 3.0.2.1.
     
  18. bajodel

    bajodel New Member

    You don't have thee 000-default symlink ..you miss the last 2 point:
    # cd /etc/apache2/sites-enabled
    # ln -s ../sites-available/default 000-default

    bye..

    bajodel
     
  19. ressel

    ressel Member

    i have tried what bajodel have wrote, but httpd (apache2) didn't start.
     
  20. bajodel

    bajodel New Member

    really sorry ressel.. i'm going to believe it's working only for me :D

    ..what error apache arises ?

    bye..

    bajodel
     

Share This Page