[Solved] A few errors after upgrade to 3.1.2 (Apache+VirtualHost knob)

Discussion in 'Installation/Configuration' started by Patrik Forsberg, Feb 12, 2017.

  1. Patrik Forsberg

    Patrik Forsberg New Member

    After upgrading ISPConfig to 3.1.2 I seemed to run into a few issues. I'm not sure if it was the same in 3.1.1p1 that I upgraded from.

    First error was that various websites were mixed up in php-fpm - this was fixed with a resync of all websites in ISPConfig - this was working prior to upgrade.

    Second issue which I have ran into is after enabling and installing Let's Encrypt I enabled Let's Encrypt SSL on a website but the configuration that was generated fails to a apachectl and also the apache restart. The reason seem to be that the port is typed wrongly in "VirtualHost" statement -
    it is written as "<VirtualHost :80>" but should be "<VirtualHost *:80>" same goes for :443 for IPv4. IPv6 seems correct.

    Also in newer Apache the NamedVirtualHost knob is no longer used and should be removed from the configuration...
     
  2. Patrik Forsberg

    Patrik Forsberg New Member

    So... I _think_ I found the reason for this. The "client" is not allowed to see or unable to see the wildcard ip "*" for the website ?
    I guess this is somewhere in the db .. it used to work perfectly well but not now .. ?
     
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Check System > Server Config > {server} > Web > Enable IP wildcard (*)
     
  4. Patrik Forsberg

    Patrik Forsberg New Member

    That is of course enabled. And it is working for the admin user but not the clients.
    Admin gets IPv4 address as "*" but a client get nothing/empty on IPv4 address for a web.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no other setting for that, I just checked the code, it only depends on "Check System > Server Config > {server} > Web > Enable IP wildcard (*)":

    $ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
    If this is a multiserver system, then ensure that you enabled the option for the crect server. And just to be sure, go to the option, ensure that it is enabled and click on save.
     
  6. Patrik Forsberg

    Patrik Forsberg New Member

    Yes I know.. looked at that code myself and could find nothing wrong with it.. I have disabled, saved, enabled, saved the option.. restarted php-fpm, apache2 and the klient between the attempts(running firefox without cache).. so I find it very very odd.. the fact is still true tho.
    First a image from a web domain as administrator
    ispconfig_WebDomain_as_admin.png
    Then the same webdomain as the client owning the web domain
    ispconfig_WebDomain_as_client.png
     
  7. Patrik Forsberg

    Patrik Forsberg New Member

    Actually looked it over with firebug and the generated html for the client has no options at all.. while admin gets <option value='*'>*</option> as expected. And actually the line i my files has no [$server_id] in them ?
     
  8. Patrik Forsberg

    Patrik Forsberg New Member

    Found the file where this gets printed and found the line you refer to but if I modify it to output the value of $web_config[$server_id]['enable_ip_wildcard'] I get no output at all. The $server_id shows "1" and if I look in the database in the server with server_id 1 it has "enable_ip_wildcard=y" under config->web .. so things look ok there..
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Really strange, everything looks fine so far. Do you use any interface customizations like a custom theme ?
     
  10. Patrik Forsberg

    Patrik Forsberg New Member

    No nothing, just basic ispconfig in multiserver setup - main interface running on the server that also runs the webs (only split out mail and dnses)
     
  11. Patrik Forsberg

    Patrik Forsberg New Member

    Finally got it to work after a bit of debugging.
    I didn't have a webserver defined for the client, only default_webserver, so when $web_config tried to fetch enable_ip_wildcard the array was actually ['']['enable_ip_wildcard'] not [1]['enable_ip_wildcard'] as it should have been.
    After changing the default template being used to have webserver set to the correct one $web_config now has a correct array where 1 is the correct webserver and thus enable_ip_wildcard is being fetched correctly :)
    Maybe it would be good with a check for default_webserver as well as webservers if webservers is "null" ..

    Either way it is now resolved for me ! :)
     
    Jesse Norell likes this.

Share This Page