Default .htaccess/index.html getting restored?

Discussion in 'Installation/Configuration' started by StrikerNL, Jun 15, 2009.

  1. StrikerNL

    StrikerNL New Member

    We seem to have some strange problems with one of our ISPconfig 3.0.1.3 servers, where under certain conditions the index.html/.htaccess from /usr/local/ispconfig/server/conf/index seem to get restored, overwriting any customer made ones.

    This seems to happen when changes are made to these domains through the admin panel, be it the site settings or any other unrelated settings such as e-mail accounts.

    Is there any explanation for this or anything we're doing wrong perhaps? What are the conditions that can trigger such a restoring of default documents?
     
  2. till

    till Super Moderator

    The documents are only copied once when the site gets created in ISPConfig 3.0.1.3. In prior versions there was a bug, so maybe your installed version is not 3.0.1.3. Which version number do you see in the footer of the interface?
     
  3. StrikerNL

    StrikerNL New Member

    huge picture removed
     
    Last edited: Jun 23, 2009
  4. till

    till Super Moderator

    I looked at the code and it only executed when a site gets created and not on updates. You can turn on debugging on your server in config.inc.php to debug this issue on your installation.
     
  5. StrikerNL

    StrikerNL New Member

    I'll have a look then. It's a bit odd though, it has happened a few times now. I hope I can figure it out. Thanks.
     
  6. StrikerNL

    StrikerNL New Member

    Well, it's happened again a few times over the weekend. Unfortunately I have absolutely no idea what causes it.

    What would be the effect if I were to simply remove all the default files (standard_index.html*) in /usr/local/ispconfig/server/conf/index?
     
  7. till

    till Super Moderator

    That would be a very bad idea as ISPConfig might stop the complete config file processing for all cahnges then. As I menztioned above, enable debugging if you want to find out what is causing this on your server.
     
  8. StrikerNL

    StrikerNL New Member

    Okay, I have enabled debugging yesterday and it happened again this morning at 09:26. This is the relevant part from the logs:

    unrelateddomain.com is an unrelated domain/vhost that was created at that point in time
    domainwithindex.com is the domain/vhost that had its index.html 'restored', which we don't want. From what I heard from the person that added unrelateddomain, he used this domain to copy its 'Apache Directives' contents to the new unrelateddomain.com 'Apache Directives' field, but no modifications were made (to the _existing_ domain).

    Does this mean anything to you? Maybe it has to do with ispconfig thinking the apache directives field is modified for the domainwithindex.com (which it isn't), triggering something?

    Code:
    25.06.2009-09:25 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:25 - DEBUG - No Updated records found, starting only the core.
    25.06.2009-09:25 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:26 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:26 - DEBUG - Found 4 changes, starting update process.
    25.06.2009-09:26 - DEBUG - Processed datalog_id 10145
    25.06.2009-09:26 - DEBUG - Processed datalog_id 10146
    25.06.2009-09:26 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    25.06.2009-09:26 - DEBUG - Call function 'insert' in plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    25.06.2009-09:26 - DEBUG - Creating Symlink: ln -s /var/log/ispconfig/httpd/[b]unrelateddomain.com[/b] /var/clients/client184/web749/log
    25.06.2009-09:26 - DEBUG - Creating Symlink: ln -s /var/clients/client184/web749/ /var/www/[b]unrelateddomain.com[/b]
    25.06.2009-09:26 - DEBUG - Creating Symlink: ln -s /var/clients/client184/web749/ /var/clients/client184/[b]unrelateddomain.com[/b]
    25.06.2009-09:26 - DEBUG - Adding the group: client184
    25.06.2009-09:26 - DEBUG - Adding the user: web749
    25.06.2009-09:26 - DEBUG - Disable SSL for: [b]unrelateddomain.com[/b]
    25.06.2009-09:26 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:26 - DEBUG - Creating the symlink: /etc/apache2/sites-enabled/[b]unrelateddomain.com[/b].vhost => /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:26 - DEBUG - Processed datalog_id 10147
    25.06.2009-09:26 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:26 - DEBUG - Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:26 - DEBUG - Disable SSL for: [b]domainwithindex.com[/b]
    25.06.2009-09:26 - DEBUG - Add server alias: [b]somealias.com[/b]
    25.06.2009-09:26 - DEBUG - Add server alias: [b]somealias2.com[/b]
    25.06.2009-09:26 - DEBUG - Add server alias: [b]somealias3.com[/b]
    25.06.2009-09:26 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]domainwithindex.com[/b].vhost
    25.06.2009-09:26 - DEBUG - Processed datalog_id 10148
    25.06.2009-09:26 - DEBUG - Call function 'restartHttpd' in module 'web_module'.
    25.06.2009-09:26 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:27 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:27 - DEBUG - Found 19 changes, starting update process.
    25.06.2009-09:27 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Disable SSL for: [b]unrelateddomain.com[/b]
    25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10149
    25.06.2009-09:27 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Disable SSL for: [b]unrelateddomain.com[/b]
    25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10150
    25.06.2009-09:27 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    25.06.2009-09:27 - DEBUG - Disable SSL for: [b]unrelateddomain.com[/b]
    25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10151
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10152
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10153
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10154
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10155
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10156
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10157
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10158
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10159
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10160
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10161
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10162
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10163
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10164
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10165
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10166
    25.06.2009-09:27 - DEBUG - Processed datalog_id 10167
    25.06.2009-09:27 - DEBUG - Call function 'restartHttpd' in module 'web_module'.
    25.06.2009-09:27 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:28 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:28 - DEBUG - Found 1 changes, starting update process.
    25.06.2009-09:28 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    25.06.2009-09:28 - DEBUG - Call function 'insert' in plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    25.06.2009-09:28 - DEBUG - Disable SSL for: [b]unrelateddomain.com[/b]
    25.06.2009-09:28 - DEBUG - Add server alias: [b]unrelatedalias.com[/b]
    25.06.2009-09:28 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/[b]unrelateddomain.com[/b].vhost
    25.06.2009-09:28 - DEBUG - Processed datalog_id 10168
    25.06.2009-09:28 - DEBUG - Call function 'restartHttpd' in module 'web_module'.
    25.06.2009-09:28 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:29 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    25.06.2009-09:29 - DEBUG - No Updated records found, starting only the core.
    This is datalog id 10148 (from sys_datalog table in database) by the way (edited to remove hostnames):

    Code:
    a:2:{s:3:"old";a:39:{s:9:"domain_id";s:2:"49";s:10:"sys_userid";s:1:"1";s:11:"sys_groupid";s:2:"13";s:13:"sys_perm_user";s:4:"riud";s:14:"sys_perm_group";s:2:"ru";s:14:"sys_perm_other";s:0:"";s:9:"server_id";s:1:"1";s:10:"ip_address";s:1:"*";s:6:"domain";s:9:"[b]domainwithindex.com[/b]";s:4:"type";s:5:"vhost";s:16:"parent_domain_id";s:1:"0";s:10:"vhost_type";s:4:"name";s:13:"document_root";s:27:"/var/clients/client10/web49";s:11:"system_user";s:5:"web49";s:12:"system_group";s:8:"client10";s:8:"hd_quota";s:3:"150";s:13:"traffic_quota";s:5:"10000";s:3:"cgi";s:1:"n";s:3:"ssi";s:1:"n";s:6:"suexec";s:1:"n";s:9:"errordocs";s:1:"1";s:15:"is_subdomainwww";s:1:"1";s:9:"subdomain";s:3:"www";s:3:"php";s:3:"mod";s:13:"redirect_type";N;s:13:"redirect_path";N;s:3:"ssl";s:1:"n";s:9:"ssl_state";N;s:12:"ssl_locality";N;s:16:"ssl_organisation";N;s:21:"ssl_organisation_unit";N;s:11:"ssl_country";N;s:11:"ssl_request";N;s:8:"ssl_cert";N;s:10:"ssl_bundle";N;s:10:"ssl_action";N;s:14:"stats_password";N;s:17:"apache_directives";s:253:"php_admin_value open_basedir /var/clients/client10/web49:/usr/share/php5:/usr/share/php:/var/lib/roundcube:/usr/share/roundcube:/etc/roundcube:/var/log/roundcube
    
    <Directory /var/www/[b]domainwithindex.com[/b]/web>
    AllowOverride Options FileInfo AuthConfig
    </Directory>
    ";s:6:"active";s:1:"y";}s:3:"new";a:39:{s:9:"domain_id";s:2:"49";s:10:"sys_userid";s:1:"1";s:11:"sys_groupid";s:2:"13";s:13:"sys_perm_user";s:4:"riud";s:14:"sys_perm_group";s:2:"ru";s:14:"sys_perm_other";s:0:"";s:9:"server_id";s:1:"1";s:10:"ip_address";s:1:"*";s:6:"domain";s:9:"[b]domainwithindex.com[/b]";s:4:"type";s:5:"vhost";s:16:"parent_domain_id";s:1:"0";s:10:"vhost_type";s:4:"name";s:13:"document_root";s:27:"/var/clients/client10/web49";s:11:"system_user";s:5:"web49";s:12:"system_group";s:8:"client10";s:8:"hd_quota";s:3:"150";s:13:"traffic_quota";s:5:"10000";s:3:"cgi";s:1:"n";s:3:"ssi";s:1:"n";s:6:"suexec";s:1:"n";s:9:"errordocs";s:1:"1";s:15:"is_subdomainwww";s:1:"1";s:9:"subdomain";s:3:"www";s:3:"php";s:3:"mod";s:13:"redirect_type";N;s:13:"redirect_path";N;s:3:"ssl";s:1:"n";s:9:"ssl_state";N;s:12:"ssl_locality";N;s:16:"ssl_organisation";N;s:21:"ssl_organisation_unit";N;s:11:"ssl_country";N;s:11:"ssl_request";N;s:8:"ssl_cert";N;s:10:"ssl_bundle";N;s:10:"ssl_action";N;s:14:"stats_password";N;s:17:"apache_directives";s:253:"php_admin_value open_basedir /var/clients/client10/web49:/usr/share/php5:/usr/share/php:/var/lib/roundcube:/usr/share/roundcube:/etc/roundcube:/var/log/roundcube
    
    <Directory /var/www/[b]domainwithindex.com[/b]/web>
    AllowOverride Options FileInfo AuthConfig
    </Directory>
    ";s:6:"active";s:1:"y";}}
     
    Last edited: Jun 25, 2009
  9. StrikerNL

    StrikerNL New Member

    As clueless as I am? :confused:
     
  10. till

    till Super Moderator

    I guess I found a possible reason for this bahaviour and why I was not able to replicate it. Most likely this happens onyl if you add a new site and afterwards update another site within the same minute until the cronjob is run as the state of a variable does not got reset after the insert of the first site correctly. Please download the attached file, unpack it and overwrite the file in /usr/local/ispconfig/server/plugins-available/
     

    Attached Files:

  11. StrikerNL

    StrikerNL New Member

    Awesome, I'll implement it first thing tuesday and I'll keep you posted if the behaviour improves. Thanks!
     
  12. StrikerNL

    StrikerNL New Member

    It seems to have fixed the issue. Thanks!
     

Share This Page