ISPConfig 3.0.5 not writing vhost files

Discussion in 'General' started by Antero Riihimäki, Aug 22, 2016.

  1. Antero Riihimäki

    Antero Riihimäki New Member

    Hello,
    I've run my Debian 7 server with ISPConfig successfully for a a couple of years now. Just recently ISPConfig stopped writing modifications to vhost files. If I edit settings on existing domain on the ISPConfig website the modifications won't translate from the web interface to the config file. If I create a new domain the system only creates blank vhost file for the new domain.

    What I've done recently is installed PHP 7 using at howtoforge

    From faqforge I found the howto to do the debugging. The output I got was this:
    Code:
    [email protected]:~# /usr/local/ispconfig/server/server.sh
    PHP Warning:  mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50544 Library:50625 in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 62
    22.08.2016-22:48 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    22.08.2016-22:48 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
    PHP Warning:  mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50544 Library:50625 in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 62
    I googled the error and it seems that installing php5-mysqlnd fixes the problem, but trying to install it gives me an error on depedency version:
    Code:
    The following packages have unmet dependencies:
     php5-mysqlnd : Depends: php5-common (= 5.4.45-0+deb7u4) but 5.4.45-1~dotdeb+7.1 is to be installed
    E: Unable to correct problems, you have held broken packages.
    
    I'm reluctant to force the older version, since all my hosted websites are running fine at the moment (some use PHP5 and some PHP7), and I'm afraid forcing the older version might brake something else?

    Additionally from the ISPConfig cron.log I found this:
    Code:
    W: GPG error: http://mirrors.linode.com wheezy Release: The following signatures were invalid: BADSIG 8B48AD6246925553 Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>
    As far as I know none of these errors can cause this problem.
     
  2. Jesse Norell

    Jesse Norell Active Member

    Look in /etc/apache2/sites-available/ (or corresponding location from nginx, which I don't know ottomh) and see if there are any files named *.err being created. If so, ISPConfig is updating the vhost config, testing if the changes are good, determining they are not, and rolling them back. You can manually copy a .err file into place (maybe save the old .vhost file somewhere) and test reloading the web server, and fixing any errors reported.
     
  3. Antero Riihimäki

    Antero Riihimäki New Member

    Thanks for the tip.

    I found several .vhost.err -files. The domain in question was among them. I made a symbolic link to the /etc/apache2/sites-enabled/ of the new domain's .vhost.err -file and ran apachectl configtest and got OK response. So the vhost should be ok...

    I reloaded the apache config and tried to access the new domains's website but it referred me to the root website that is at /var/www/ so it seems the vhost isin't loaded/configured.
     
  4. Jesse Norell

    Jesse Norell Active Member

    could see what 'apachectl -S' shows, maybe will point to the issue.
     
  5. Antero Riihimäki

    Antero Riihimäki New Member

    The output on apachectl -S is:
    Code:
    [email protected]:/etc/apache2/sites-available# apachectl -S
    VirtualHost configuration:
    1.2.3.4:80  webmail.saferock.fi (/etc/apache2/sites-enabled/squirrelmail:21)
    wildcard NameVirtualHosts and _default_ servers:
    _default_:8081  server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-apps.vhost:9)
    *:8080  is a NameVirtualHost
      default server server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-ispconfig.vhost:9)
      port 8080 namevhost server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-ispconfig.vhost:9)
    *:443  is a NameVirtualHost
      default server anteroriihimaki.org (/etc/apache2/sites-enabled/100-anteroriihimaki.org.vhost:126)
      port 443 namevhost anteroriihimaki.org (/etc/apache2/sites-enabled/100-anteroriihimaki.org.vhost:126)
      port 443 namevhost hoivakauppa.com (/etc/apache2/sites-enabled/100-hoivakauppa.com.vhost:127)
      port 443 namevhost oliverbriny.com (/etc/apache2/sites-enabled/100-oliverbriny.com.vhost:115)
      port 443 namevhost runforfreedom.fi (/etc/apache2/sites-enabled/100-runforfreedom.fi.vhost:128)
      port 443 namevhost talorauta.fi (/etc/apache2/sites-enabled/100-talorauta.fi.vhost:127)
      port 443 namevhost woodacious.com (/etc/apache2/sites-enabled/100-woodacious.com.vhost:124)
      port 443 namevhost paistinpannu.tassu.org (/etc/apache2/sites-enabled/default-ssl:2)
      port 443 namevhost riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/riihimaki-yhtiot.fi.vhost-le-ssl.conf:8)
    *:80  is a NameVirtualHost
      default server server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-default:1)
      port 80 namevhost server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-default:1)
      port 80 namevhost anteroriihimaki.org (/etc/apache2/sites-enabled/100-anteroriihimaki.org.vhost:7)
      port 80 namevhost appetit.fi (/etc/apache2/sites-enabled/100-appetit.fi.vhost:7)
      port 80 namevhost biokaasulaskin.fi (/etc/apache2/sites-enabled/100-biokaasulaskin.fi.vhost:7)
      port 80 namevhost bugas.fi (/etc/apache2/sites-enabled/100-bugas.fi.vhost:7)
      port 80 namevhost hoivakauppa.com (/etc/apache2/sites-enabled/100-hoivakauppa.com.vhost:7)
      port 80 namevhost ideoitakotiin.com (/etc/apache2/sites-enabled/100-ideoitakotiin.com.vhost:7)
      port 80 namevhost jariviherlampi.fi (/etc/apache2/sites-enabled/100-jariviherlampi.fi.vhost:7)
      port 80 namevhost oliverbriny.com (/etc/apache2/sites-enabled/100-oliverbriny.com.vhost:7)
      port 80 namevhost pilviturva.fi (/etc/apache2/sites-enabled/100-pilviturva.fi.vhost:7)
      port 80 namevhost poliklinikkatoivola.fi (/etc/apache2/sites-enabled/100-poliklinikkatoivola.fi.vhost:7)
      port 80 namevhost psykologisoukainen.saferock.fi (/etc/apache2/sites-enabled/100-psykologisoukainen.saferock.fi.vhost:7)
      port 80 namevhost riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/100-riihimaki-yhtiot.fi.vhost:7)
      port 80 namevhost runforfreedom.fi (/etc/apache2/sites-enabled/100-runforfreedom.fi.vhost:7)
      port 80 namevhost saferock.fi (/etc/apache2/sites-enabled/100-saferock.fi.vhost:7)
      port 80 namevhost talorauta.fi (/etc/apache2/sites-enabled/100-talorauta.fi.vhost:7)
      port 80 namevhost viherlampi.fi (/etc/apache2/sites-enabled/100-viherlampi.fi.vhost:7)
      port 80 namevhost woodacious.com (/etc/apache2/sites-enabled/100-woodacious.com.vhost:7)
    Syntax OK
    
     
  6. Jesse Norell

    Jesse Norell Active Member

    Is the domain in question listed there under the *:80 vhosts? (I don't see the domain mentioned specifically, maybe I missed it) If not, it will use `default server server1.riihimaki-yhtiot.fi (/etc/apache2/sites-enabled/000-default:1)`
     
  7. Antero Riihimäki

    Antero Riihimäki New Member

    Sorry, I haven't actually mentioned it. The domain I'm having problems with is oliverbriny.com
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    an .err file gets created when apache did not srat with that config. You can either use the ispconfig debug mode to find out more about that issue or renmae the .vahst file to .vhost_bak and then the .vhost_err file to .vhost (dont add another symlink), then restart apache, you should see the error in the apache log then. If you dont see an error, then the problem might have been temporary, e.g. a change in the apache config outside of the vhost made the apache restart to fail and triggered the restore of the last working config.
     
  9. Antero Riihimäki

    Antero Riihimäki New Member

    Thank you I tried that today. I tried it also a couple of days back, but now for no apparent reason it started to work...

    Sad to say I have no idea why it works now, but it didn't work a few days back. I used the exact same copy commands and same .vhost file... o_O
     

Share This Page