HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Default .htaccess/index.html getting restored? (http://www.howtoforge.com/forums/showthread.php?t=36515)

StrikerNL 15th June 2009 13:52

Default .htaccess/index.html getting restored?
 
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?

till 16th June 2009 14:48

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?

StrikerNL 16th June 2009 14:51

huge picture removed

till 16th June 2009 15:07

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.

StrikerNL 16th June 2009 15:08

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.

StrikerNL 23rd June 2009 08:53

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?

till 23rd June 2009 09:54

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.

StrikerNL 25th June 2009 13:54

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/unrelateddomain.com /var/clients/client184/web749/log
25.06.2009-09:26 - DEBUG - Creating Symlink: ln -s /var/clients/client184/web749/ /var/www/unrelateddomain.com
25.06.2009-09:26 - DEBUG - Creating Symlink: ln -s /var/clients/client184/web749/ /var/clients/client184/unrelateddomain.com
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: unrelateddomain.com
25.06.2009-09:26 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/unrelateddomain.com.vhost
25.06.2009-09:26 - DEBUG - Creating the symlink: /etc/apache2/sites-enabled/unrelateddomain.com.vhost => /etc/apache2/sites-available/unrelateddomain.com.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: domainwithindex.com
25.06.2009-09:26 - DEBUG - Add server alias: somealias.com
25.06.2009-09:26 - DEBUG - Add server alias: somealias2.com
25.06.2009-09:26 - DEBUG - Add server alias: somealias3.com
25.06.2009-09:26 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/domainwithindex.com.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: unrelateddomain.com
25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/unrelateddomain.com.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: unrelateddomain.com
25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/unrelateddomain.com.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: unrelateddomain.com
25.06.2009-09:27 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/unrelateddomain.com.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: unrelateddomain.com
25.06.2009-09:28 - DEBUG - Add server alias: unrelatedalias.com
25.06.2009-09:28 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/unrelateddomain.com.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:"domainwithindex.com";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/domainwithindex.com/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:"domainwithindex.com";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/domainwithindex.com/web>
AllowOverride Options FileInfo AuthConfig
</Directory>
";s:6:"active";s:1:"y";}}


StrikerNL 28th June 2009 20:27

As clueless as I am? :confused:

till 28th June 2009 22:57

1 Attachment(s)
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/


All times are GMT +2. The time now is 21:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.