PDA

View Full Version : index.html keeps reappearing


gkovacs
18th January 2009, 07:23
I have a couple of sites running on ISPConfig 3.0.0.8. One problem that bothers me is that the 4 default files in the web/ folder (index.html, favicon.ico, .htaccess and robots.txt) keep reappearing even after being deleted several times.

What could cause this behaviour and how can I solve this?

till
18th January 2009, 12:05
Did you create a own index file in the website? If yes and the files still reappear, please post it to the bugtracker:

http://bugtracker.ispconfig.org

reed
20th January 2009, 01:14
I have the same problem. Running 2.2.29 in SUSE 10.2. I can upload and replace index.html file to the web directory in a newly created site but url resolves to the old index.html file

gkovacs
20th January 2009, 09:44
Did you create a own index file in the website? If yes and the files still reappear, please post it to the bugtracker:

http://bugtracker.ispconfig.org

I did not create an index.html, I have an index.php file, but every 1-2 days (I'm not sure what triggers it) all four original files reappear in the web/ folder.

It even empties my .htaccess file, but interestingly not with the original one.

till
20th January 2009, 11:02
A index.php file is fine. ISPConfig will not copy the files again if there is a file named index.php, index.htm, index.html etc. The standard index files can be set in the ispconfig interface. Maybe you removed index.php from the list of standard index pages.

gkovacs
28th January 2009, 08:13
A index.php file is fine. ISPConfig will not copy the files again if there is a file named index.php, index.htm, index.html etc.

Unfortunately, it does. I have an index.php and a .htaccess, and both get overwritten every 2 days.


The standard index files can be set in the ispconfig interface. Maybe you removed index.php from the list of standard index pages.

Although I don't remember removing index.php from anywhere, exactly where can I find this list of index pages?

till
28th January 2009, 12:22
Unfortunately, it does. I have an index.php and a .htaccess, and both get overwritten every 2 days.

Ok, then it is most likely not related to ISPConfig as ISPConfig does not put any .htaccess files in the web root of a server, it only adds a .htaccess file to the stats directory. Also there is no cronjob in ispconfig that runs every two days.

gkovacs
28th January 2009, 13:45
I'm POSITIVE it's ISPConfig, since the 4 default files in the web/ folder get copied back, with their original permissions (they show up in green in MC):

index.html
favicon.ico
robots.txt
.htaccess (0 byte length)

Also it's not strictly 2 days, it's rougly a couple of days. As I've said, I'm not sure what the trigger is, but it sure doesn't give a damn about my index.php file.

gkovacs
28th January 2009, 13:53
BTW we use the following .htaccess file:

DirectoryIndex index.php
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

Is it possible that this fools ISPConfig somehow? Because it seems that after creating this .htaccess will the restoring happen.

falko
29th January 2009, 19:19
Can you go to the web site's document root and post the output of ls -la?

gkovacs
29th January 2009, 19:38
Below is the root of the affected site. If I leave it this way, nothing happens.

But if I create a .htaccess file with the above content, the copying will happen sometime in the near future (I suspect by cron or after regular ispconfig activity, but usually not the same day).

total 1804
drwxr-xr-x 36 web19 client3 4096 Jan 29 18:34 .
drwxr-xr-x 6 web19 client3 4096 Jan 23 06:44 ..
-rw-r--r-- 1 web19 client3 85969 Dec 2 2007 CHANGELOG.php
-rw-r--r-- 1 web19 client3 3429 Dec 2 2007 COPYRIGHT.php
-rw-r--r-- 1 web19 client3 4374 Dec 2 2007 INSTALL.php
-rw-r--r-- 1 web19 client3 17977 Dec 2 2007 LICENSE.php
...
code removed for security

falko
30th January 2009, 13:21
Permissions look ok. I have no idea what's causing this...
When the files get replaced, what's in index.html? Is it the ISPConfig welcome page?

gkovacs
30th January 2009, 15:10
Permissions look ok. I have no idea what's causing this...
When the files get replaced, what's in index.html? Is it the ISPConfig welcome page?

Yes, the 3 default files from the ISPConfig site and a 0 byte .htaccess file.

falko
31st January 2009, 14:12
I have no idea what's causing this. All I can say is that ISPConfig doesn't put a welcome page in the directory if there's an index file in it. You can check that in the function make_docroot() in /root/ispconfig/scripts/lib/config.lib.php.

gkovacs
2nd February 2009, 19:41
The copier striked again at 18:19 today on one of our servers, for no reason at all. Overwrote the root folders of a lot of our (operational) domains with the ISPConfig default structure (index.html, robots.txt, favicon.ico and a ZERO byte .htaccess file, plus two folders: error/ and stats/)

Here is the ISPConfig log of the operation:
http://testblueray.pannonhosting.hu/log.txt

(A note of our setup: the dbispconfig database is located on a separate MySQL server, if that affects the operation in any way. Maybe an SQL timeout causes this?)

gkovacs
4th February 2009, 18:06
We have nailed the ISPConfig problem down (overwriting of user files with the default web/ structure) to most likely be caused by some error in the database code.

Experience:
The last unwanted overwriting happened when our MySQL server was down or at least very unresponsive for a couple of minutes.

Conjecture:
ISPConfig tries to check a particular site in it's database (maybe from cron?), if it encounters a timeout with MySQL then it initializes the entire site again, copying back the default files and folders, not checking for user index files.


We are trying to reproduce the problem, but it's not easy to intentionally slow down MySQL without not returning an error.
Any helpful ideas / insights?

falko
5th February 2009, 21:39
I've added this to our bugtracker.

askibinski
24th September 2009, 11:37
I can confirm this bug (ispconfig 3.0.1). Seems to happen during a cron run.

This is a critical bug as it can take down a live site. Any updates on this? (what's the link to this bug in the bugtracker?)

In the meanwhile, I'm looking for a workaround by removing the default files (which I don't need anyway) all together. I think the config for that would be somewhere in /usr/local/ispconfig/conf ?

till
24th September 2009, 11:51
This has been fixed a long time ago, ISPConfig 3.0.1 is a outdated version, please update to the current release (3.0.1.4)

sulfuric
8th February 2012, 20:05
drwx--x--- 5 web31 client2 4096 Feb 8 18:39 .
drwxr-x--x 6 web31 client2 4096 Feb 8 17:48 ..
-rw-r--r-- 1 web31 client2 824 Feb 8 17:49 arrows.png
-rw-r--r-- 1 web31 client2 1281 Feb 8 17:49 bullets.png
-rw-r--r-- 1 web31 client2 1620 Feb 8 17:49 default.css
drwxr-xr-x 2 web31 client2 4096 Feb 8 17:48 error
-rwxr-xr-- 1 web31 client2 7358 Feb 8 18:57 favicon.ico
-rwxr-xr-- 1 web31 client2 26 Feb 8 18:57 .htaccess
drwxr-xr-x 2 web31 client2 4096 Feb 8 17:50 images
-rw-r--r-- 1 web31 client2 1877 Feb 8 18:32 index.htm
-rwxr-xr-- 1 web31 client2 1861 Feb 8 18:57 index.html
-rw-r--r-- 1 web31 client2 93868 Feb 8 17:50 jquery-1.7.1.min.js
-rw-r--r-- 1 web31 client2 24996 Feb 8 17:50 jquery.nivo.slider.js
-rw-r--r-- 1 web31 client2 11561 Feb 8 17:50 jquery.nivo.slider.pack.js
-rw-r--r-- 1 web31 client2 1737 Feb 8 17:50 loading.gif
-rw-r--r-- 1 web31 client2 1507 Feb 8 17:50 nivo-slider.css
-rwxr-xr-- 1 web31 client2 24 Feb 8 18:57 robots.txt
-rw-r--r-- 1 web31 client2 36094 Feb 8 17:50 slider.png
drwxr-xr-x 2 web31 client2 4096 Feb 8 17:48 stats
-rw-r--r-- 1 web31 client2 1979 Feb 8 17:50 style.css

that's 4 files keep regenerating all minute

-rwxr-xr-- 1 web31 client2 7358 Feb 8 18:57 favicon.ico
-rwxr-xr-- 1 web31 client2 26 Feb 8 18:57 .htaccess
-rwxr-xr-- 1 web31 client2 1861 Feb 8 18:57 index.html
-rwxr-xr-- 1 web31 client2 24 Feb 8 18:57 robots.txt

after 3 minuts

-rwxr-xr-- 1 web31 client2 7358 Feb 8 19:00 favicon.ico
-rwxr-xr-- 1 web31 client2 26 Feb 8 19:00 .htaccess
-rwxr-xr-- 1 web31 client2 1861 Feb 8 19:00 index.html
-rwxr-xr-- 1 web31 client2 24 Feb 8 19:00 robots.txt

sulfuric
9th February 2012, 11:47
I see that in /etc/httpd/conf/sites-available the last create hosts keep regenerating.

-rw-r--r-- 1 root root 3551 Feb 8 14:16 xxxxxxeds.es.vhost
-rw-r--r-- 1 root root 2461 Feb 8 14:16 apartmentsbenidorm.xxxxxxntsvalencia.es.vhost
-rw-r--r-- 1 root root 4148 Feb 8 14:16 xxxxxxentsvalencia.es.vhost
-rw-r--r-- 1 root root 1022 Feb 9 10:38 apps.vhost
-rw-r--r-- 1 root root 2398 Feb 8 14:16 barcelona.xxxxxentsvalencia.es.vhost
-rw-r--r-- 1 root root 3534 Feb 8 14:16 xxxxxoliday.com.vhost
-rw-r--r-- 1 root root 2138 Feb 8 14:16 holiday.xxxxxxentsvalencia.es.vhost.err
-rw-r--r-- 1 root root 3960 Feb 8 14:16 holiday.xxxxxxa-holiday.com.vhost
-rw-r--r-- 1 root root 2433 Feb 8 14:16 hostelvalencia.xxxxxxentsvalencia.es.vhost
-rw-r--r-- 1 root root 2454 Feb 8 14:16 hotelesparagrupos.xxxxxxentsvalencia.es.vhost
-rw-r--r-- 1 root root 1350 Feb 8 14:24 ispconfig.conf
-rw-r--r-- 1 root root 1688 Feb 8 14:24 ispconfig.vhost
-rw-r--r-- 1 root root 2398 Feb 8 14:16 peniscola.xxxxxxentsvalencia.es.vhost
-rw-r--r-- 1 root root 2424 Feb 8 14:16 xxxxxxplayaresort.com.vhost
-rw-r--r-- 1 root root 3581 Feb 8 14:16 pruebas.xxxxxxia-holiday.com.vhost
-rw-r--r-- 1 root root 3541 Feb 8 14:16 xxxxxxms.es.vhost
-rw-r--r-- 1 root root 3630 Feb 8 14:16 xxxxxxe.valencia-holiday.com.vhost
-rw-r--r-- 1 root root 2696 Feb 9 10:38 svn.xxxencia-holiday.com.vhost
-rw-r--r-- 1 root root 2780 Feb 9 10:38 xxxxxxpartments.com.vhost
-rw-r--r-- 1 root root 3040 Feb 9 10:38 xxxxxxia-holiday.com.vhost

till
9th February 2012, 11:51
Are there any pending jobs listed in the jobqueue of the ispconfig monitor?
Are there any messages with level "error" in the syslog in the ispconfig monitor?

sulfuric
9th February 2012, 13:12
Yes jobqueue is full:

2012-02-08 17:31 server.xxxxxaprop.net Update web_domain
2012-02-08 17:00 server.xxxxxaprop.net Update web_domain
2012-02-08 16:58 server.xxxxxaprop.net Update cron
2012-02-08 16:48 server.xxxxxaprop.net Insert ftp_user
2012-02-08 16:47 server.xxxxxaprop.net Insert web_domain
2012-02-06 09:35 server.xxxxxaprop.net Update web_domain
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_soa
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
2012-01-26 12:56 server.xxxxxaprop.net Delete dns_rr
Page 1 of 12

NO errors in syslog ...

till
9th February 2012, 13:14
Ok,so there must be something on your server that blocks processing of jobs, so that the first job is repeated every minute.

Pleases ee here on how to debug that:

http://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

sulfuric
9th February 2012, 16:53
thats the debug tail

09.02.2012-14:37 - DEBUG - Processed datalog_id 1435
PHP Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 184
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
09.02.2012-14:37 - DEBUG - Calling function 'restartBind' from module 'dns_module'.
PHP Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 184
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
09.02.2012-14:37 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
PHP Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 184
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
09.02.2012-14:37 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
PHP Warning: mysql_real_escape_string(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 184
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
PHP Warning: mysql_select_db(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 104
finished.
PHP Warning: mysql_close(): 7 is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 360

i see similar problem http://www.howtoforge.com/forums/archive/index.php/t-51900.html but no solution.

thanks for your helpful.

till
9th February 2012, 17:02
Check that the mysql login details in the following files are correct:

/usr/local/ispconfig/server/lib/config.inc.php
/usr/local/ispconfig/server/lib/mysql_clientdb.conf

You can check them with the mysql comand like this:

mysql -h localhost -u username dbispconfig

replace username with the username from the file, the mysql command will then ask for the password, use the password from the config file.

sulfuric
9th February 2012, 17:41
Yes.

It's correct and i can login with this credential with console mysql -u root -p and with phpmyadmin

in /usr/local/ispconfig/server/lib/mysql_clientdb.conf only this 3 variables is normal ??

$clientdb_host = 'localhost';
$clientdb_user = 'xxxxxx';
$clientdb_password = 'kaoxxxxxx';

no $clientdb_database for example ??

thanks a lot ??

till
9th February 2012, 17:47
only this 3 variables is normal ??

Yes, thats ok.

Have you set some short timeouts in the my.cnf cobnfiguration file, if yes, then this might cause your problem as well when the mysql connection is dropped too fast.

sulfuric
9th February 2012, 18:14
the output of tail -n 100 /var/log/mysqld.log

120209 15:33:27 [Warning] Found invalid password for user: 'ispconfig@localhost'; Ignoring user
120209 15:33:27 [Warning] Found invalid password for user: 'ispconfig@localhost'; Ignoring user
120209 15:37:34 [Warning] Found invalid password for user: 'ispconfig@localhost'; Ignoring user
120209 15:37:34 [Warning] Found invalid password for user: 'ispconfig@localhost'; Ignoring user

but the user and pass is correct on this files.

till
9th February 2012, 18:17
The ispconfig user is used by all services to connect to the mysql db. Have you changed the password for the ispconfig user manually?

sulfuric
9th February 2012, 18:42
Yes,

I use root user and password for the

mysql-virtual_client.cf
mysql-virtual_recipient.cf
mysql-virtual_transports.cf

etc files ...

till
9th February 2012, 18:48
Thats not good, as it destroyed the ispconfig setup and is really insecure as well. You should undo the changes in all config files where you changed a mysql user.

The mysql user that is used by the services like postfix, dovecot, courier, vlogger and pure-ftpd has to be the user "ispconfig" with the password that you find in the ispconfig config.inc.php files.

sulfuric
9th February 2012, 18:49
I changed becouse ispconfig user got login error.

sulfuric
9th February 2012, 18:57
Don't worry thanks a lot i can reinstall server and then migrate.

till
9th February 2012, 18:58
The username has to be "ispconfig" and the password has to be the password that is in the files /usr/local/ispconfig/server/lib/config.inc.php and /usr/local/ispconfig/interface/lib/config.inc.php.

This mysql user is a user which is managed by ispconfig internally and shall not be altered as manual changes will break your server. You should either restore backups of all config files that you altered manually or you will have to search and fix all files which contain mysql login details to match the files from ispconfig. The files with the mysql login details are in the following locations on debian systems, the locations may differ on other distributions.

/etc/postfix/
/etc/dovecot/
/etc/courier/
/etc/pure-ftpd/
/etc/amavis/
/etc/vlogger-dbi.conf

sulfuric
9th February 2012, 20:12
OK thanks

SOLVED !!! thanks a lot ...