Hi, I havent changed anything in my isp2 and isp generates almost all files without correct vhosts file. Code: when I'm reading logs or trying to do antyhing like #time /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php export APACHE_RUN_USER=www-data start sh: ./etc/apache2/envvars: No such file or directory ende real 0m2.133s user 0m0.320s sys 0m0.160s envvars exists, it is -rw-r--r-- 1 root root 378 sty 20 2009 envvars Code: 2# cat envvars # envvars - default environment variables for apache2ctl # Since there is no sane way to get the parsed apache2 config in scripts, some # settings are defined via environment variables and then used in apache2ctl, # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data export APACHE_PID_FILE=/var/run/apache2.pid i'd also checked with tail -f what ispconfig tries to insert to vhost Code: # Vhost: www.php1.domain.tld:80 ###################################### # # <VirtualHost 78.46.185.95:80> ServerName www.php1.domain.tld:80 ServerAdmin [email protected] DocumentRoot /var/www/web81/web ServerAlias php1.ethi.pl DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm Alias /cgi-bin/ /var/www/web81/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web81/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode On php_admin_value open_basedir /var/www/web81/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web81/phptmp/ php_admin_value session.save_path /var/www/web81/phptmp/ Alias /error/ "/var/www/web81/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web81/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web81/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost> # # # and element od ispconfig.log Code: 26.09.2009 - 20:58:54 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2655: WARNING: could not ./etc/apache2/envvars && httpd -t &> /dev/null 2645 26.09.2009 - 20:58:54 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2669: httpd syntax seems to contain errors, reloading with old configuration 2646 26.09.2009 - 20:58:54 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2670: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig. conf_26-09-09_20-58-54 2647 26.09.2009 - 20:58:54 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2671: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/ Vhosts_ispconfig.conf I'm thinking about an update to isp2 .33 version but till I' wil not have working backup I'm scared about updating it... had any body such problem?
Please note that it complaints about a relative file (it begins with a dot, so the location is from the current directory). So if you don't have that path under your current directory, it will fail (as it is doing). Check your PHP, or execute that on the root (/), were it will find the relative path.
I'd executed it from root ( / ) and gos this Code: /# time /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php export APACHE_RUN_USER=www-data start sh: ./etc/apache2/envvars: Acces denied ende real 0m6.953s user 0m0.256s sys 0m0.056s there is some problem probably with permissions but I havent changed anything. 88 webs were created successfully by half a year an now something happened. I'd changed permissions od envvars to admispconfig:root, chmod 664 and got the same. what is more I checked it on my virtual isp config ant there in logs everything seems to be the same and it works... EDIT: between . and / was an space which i had to delete but still it does not work. Could installing an apache2-mpm-itk affected this thing?
Ok, with a space between the dot and the envvars path, the issue is about permissions. If the www-data user has a valid shell (not /bin/true), you can su to it and test for if it has permissions: Code: su www-data cat /etc/apache2/envvars If you can't, check for permissions in directories (/etc and /etc/apache2)
Code: sudo su h:/home/user/# su www-data h:/home/user/$ cat /etc/apache2/envvars # envvars - default environment variables for apache2ctl # Since there is no sane way to get the parsed apache2 config in scripts, some # settings are defined via environment variables and then used in apache2ctl, # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data export APACHE_PID_FILE=/var/run/apache2.pid so it works. What is more and may be connected is the thing that just before that problem I made 2 websites but only oon 777 permissions files could be written. 755 775 didn't worked only 777 so i'd installed a apache2-mpm-itk and now I do not know is it connected or not. When i try to add Code: <IfModule mpm_itk_module> AssignUserId www-data web77 </IfModule> by panel it also generates Code: 28.09.2009 - 16:03:59 => INFO - Signalfile Set: insert 28.09.2009 - 16:04:07 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 259: setquota -g web52 256000 257024 0 0 -a &> /dev/null 28.09.2009 - 16:04:07 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 260: setquota -T -g web52 604800 604800 -a &> /dev/null 28.09.2009 - 16:04:07 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 279: Connected successfully 28.09.2009 - 16:04:08 => INFO - USER: domain.net_ftp:x:10069:10052:ftp:/var/www/web52:/bin/false 28.09.2009 - 16:04:08 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 910: setquota -u domain.net_ftp 0 0 0 0 -a &> /dev/null 28.09.2009 - 16:04:08 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 911: setquota -T -u domain.net_ftp 604800 604800 -a &> /dev/null 28.09.2009 - 16:04:08 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web52/.forward 28.09.2009 - 16:04:08 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 117: symlink /var/www/web52/Maildir 28.09.2009 - 16:04:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~ 28.09.2009 - 16:04:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~ 28.09.2009 - 16:04:09 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: postmap hash:/etc/postfix/virtusertable 28.09.2009 - 16:04:09 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1268: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~ 28.09.2009 - 16:04:13 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2655: WARNING: could not . /etc/apache2/envvars && httpd -t &> /dev/null 28.09.2009 - 16:04:13 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2669: httpd syntax seems to contain errors, reloading with old configuration 28.09.2009 - 16:04:13 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2670: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_28-09-09_16-04-13 28.09.2009 - 16:04:13 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2671: mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf~ /etc/apache2/vhosts/Vhosts_ispconfig.conf 28.09.2009 - 16:04:14 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 755: /etc/init.d/apache2 reload &> /dev/null 28.09.2009 - 16:04:14 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2119: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~ Code: whoami www-data h:/home/user/.ssh$ httpd -t [Mon Sep 28 16:07:52 2009] [warn] module dav_module is already loaded, skipping [Mon Sep 28 16:07:52 2009] [warn] module dav_svn_module is already loaded, skipping httpd: bad user name ${APACHE_RUN_USER} Code: whoami www-data h:/home/shrek/.ssh$ . /etc/apache2/envvars && httpd -t [Mon Sep 28 16:09:12 2009] [warn] module dav_module is already loaded, skipping [Mon Sep 28 16:09:12 2009] [warn] module dav_svn_module is already loaded, skipping [Mon Sep 28 16:09:12 2009] [warn] Useless use of AllowOverride in line 18 of /etc/apache2/svn-vhosts/svn.domain.net.conf. [Mon Sep 28 16:09:12 2009] [warn] NameVirtualHost 78.46.x.x:80 has no VirtualHosts [Mon Sep 28 16:09:12 2009] [warn] NameVirtualHost 78.46.x.x:90 has no VirtualHosts [Mon Sep 28 16:09:12 2009] [warn] NameVirtualHost 78.46.x.x:90 has no VirtualHosts Syntax OK just while ago i have manually added to vhost.conf a vhost conf generated by isp ( i caught it with tail -f /etc/apache2/vhost/Vhost... ) I'd su www-data Code: # su www-data h:/home/shrek/.ssh$ . /etc/apache2/envvars && httpd -t [Mon Sep 28 16:17:57 2009] [warn] module dav_module is already loaded, skipping [Mon Sep 28 16:17:57 2009] [warn] module dav_svn_module is already loaded, skipping [Mon Sep 28 16:17:58 2009] [warn] Useless use of AllowOverride in line 18 of /etc/apache2/svn-vhosts/svn.domain.net.conf. [Mon Sep 28 16:17:58 2009] [warn] NameVirtualHost 78.46.x.x:80 has no VirtualHosts [Mon Sep 28 16:17:58 2009] [warn] NameVirtualHost 78.46.x.x:90 has no VirtualHosts [Mon Sep 28 16:17:58 2009] [warn] NameVirtualHost 78.46.x.x:90 has no VirtualHosts Syntax OK so why manually it work and automatically doesn't
yesterday I have solved problem, I have loaded an old apache.conf and reinstalled apache2. And when I checked differences between files the only tihing was that in working apache.conf the pid directory was a variable an in unworking was it set up still with the same file like in envvars.