[VHOST] Files overwritten after last update

Discussion in 'Installation/Configuration' started by KRG-23, Jul 24, 2013.

  1. KRG-23

    KRG-23 New Member


    I just registered these forums because I was told ISPConfig 3 is a must for creating automatic webhosting solutions.

    And it is, really. So I went head first in it and spent numerous hours literally struggling with it (I am not quite a linux adept but I am learning). In this hand to hand combat, I eventually achieved what I had planned, to have a website properly working.

    But that was before the last update. Or so. I am not sure if my problem is related to this update but I've noticed that vhosts files are somehow badly written. Every single change I make (add subdomains for instance) prevents my website from being accessible.

    So as to make myself understandable, here is what is working and what is not:

    This was written with my own hands after searching the interwebs. It is working.

    This vhost file returns the how-so-annoying Squirrelmail homepage and any direct access to directories returns the "could not be found" page ...

    I understand that in the first file, a lot of features are not implemented, but this is on purpose, my website being a kind of sandbox. But in the second file, I don't quite get what is going wrong. I can see differences, but they are not relevent/obvious for me. I want to have acces to any folder in the /web/ directory. I can't because when I manually change the Options +Indexes, it is overwritten by the next change in ISPConfig...

    I rent a VPS and followed the Perfect Server howto based on a Ubuntu 12.04 LTS.

    Here is the bind9 conf :
    OVH is the registrar to whom I bought the domain name.

    So as to keep my own modifications (like +Indexes) in the vhost files, should I use the Options in the webinterface ? Why did these files changed and somehow messed up with my website ?

    Thank you for your help and sorry for my English ...
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    To add custom code to the vhost files there is the "Apache directives" field in the website "options" tab inside of ISPConfig.
    Each time you change anything about the website in ISPConfig the corresponding vhost file is rewritten.

    You have two options:

    1.) if you make different changes to different websites
    go to ISPConfig (as admin), go to the website section, click your website, click the options tab and enter all your modifications into the Apache Directives field.

    2.) if you make the same changes to all vhosts
    copy the /usr/local/ispconfig/server/conf/vhost.conf.master to /usr/local/ispconfig/server/conf-custom/ and edit this file to match your needs. This is the vhost template used for all website vhost files.
  3. KRG-23

    KRG-23 New Member

    oh, thanks a ton. I'll try that after a good night sleep. I'll keep you posted :)
  4. KRG-23

    KRG-23 New Member

    So I put the whole content of the first file in the Apache Directives and it works like a charm.

    Thanks for your help on this, I can see that I did not pay enough attention to this optionnal setting.

    However, it is worring to see that a default ISPConfig config does not work. At least, for me.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The default config that ispconfig creates works fine on more then hundred thousamd servers worldwide, so there must be a installation issue on your server if it does not work for you.
  6. KRG-23

    KRG-23 New Member

    That's exactly what I was thinking when I first installed it. It's been running on my VPS since February, I never had to touch anything to make my website available. And there was this update. I am respectfull. It's not because I had a problem that it means it's a total fail.
    I am interested in knowing what went wrong with the last update on my system. If a uninstall.sh existed, and honestly I did not check if such a script existed, I would unstall it and reinstall it and restart from scratch.

    This is why I posted both files, because I don't know what is wrong with the generated one ...
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The vhost file generated by ispconfig is absolutely fine, the problem is in your squirrelmail.conf file. Open the squirrelmail.conf and find the vhost section, there you must have entered a vhost with IPADDRESS:80 instead of *:80, the ip based vhost which is basically a super default site that redirects all requests to wildcard vhosts to squirrelmail, so when you enter any domain name, you will get squirrelmail. Change that vhost to*:80 instead. Alternatively you can select the IP instead of * in the website settings in ispconfig so your website vhost will be ip based too. Never mix * and IP based vhosts on a apache server as a IP based vhost always take precedence over the wildcard based vhosts.

Share This Page