View Single Post
  #30  
Old 21st November 2008, 19:58
miguelpinheiro miguelpinheiro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Question

I still couldn't get subdomains to work with ISPConfig.

I noticed that Vhosts_ispconfig.conf has the subdomain rule:
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 213.251.135.195:80
<VirtualHost 213.251.135.195:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
  </IfModule>
</VirtualHost>
NameVirtualHost 87.98.230.87:80
<VirtualHost 87.98.230.87:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
  </IfModule>
</VirtualHost>
#
#
######################################
# Vhost: www.mydomain.com:80
######################################
#
#
<VirtualHost 213.251.135.195:80>
ServerName www.mydomain.com:80
ServerAdmin webmaster@mydomain.com
DocumentRoot /var/www/web1/web
ServerAlias mydomain.com socios.mydomain.com
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/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
<IfModule mod_ruby.c>
  <Directory /var/www/web1/web>
    Options +ExecCGI
  </Directory>
  RubyRequire apache/ruby-run
  #RubySafeLevel 0
  <Files *.rb>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
  <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
</IfModule>
<IfModule mod_python.c>
 <Directory /var/www/web1/web>
   Options +Indexes +FollowSymLinks +MultiViews
   AllowOverride Indexes AuthConfig Limit FileInfo
   Order allow,deny
   allow from all
   AddHandler mod_python .py
   PythonHandler mod_python.publisher
   PythonDebug On
 </Directory>
</IfModule>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .ws .wmlscript
AddType image/vnd.wap.wbmp .wbmp
Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
RewriteEngine on
RewriteCond %{HTTP_HOST}   ^socios\.mydomain\.com [NC]
RewriteRule   ^/(.*)$  http://www.mydomain.com/socios$1  [R]
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</IfModule>
</VirtualHost>
#
#
However I just noticed there is no updated Vhosts_ispconfig.conf_<date> file created.

I made the following:
1) Make a backup of /etc/apache2/vhosts/Vhosts_ispconfig.conf
2) Rename the latest file /etc/apache2/vhosts/Vhosts_ispconfig.conf_.... that has a date appended to /etc/apache2/vhosts/Vhosts_ispconfig.conf
3) run

httpd -t

I got:
Code:
httpd: bad user name ${APACHE_RUN_USER}
The result of ls -la /root/ispconfig:
Code:
drwxr-xr-x 10 root root  4096 2008-11-21 18:45 .
drwxr-xr-x  9 root root  4096 2008-11-16 20:34 ..
-rwxr-xr-x  1 root root 35143 2008-11-16 20:35 cronolog
-rwxr-xr-x  1 root root  9673 2008-11-16 20:35 cronosplit
drwxr-xr-x 12 root root  4096 2008-11-16 20:15 httpd
drwxr-xr-x 16 root root  4096 2008-11-16 20:35 isp
drwxr-xr-x  7 root root  4096 2008-11-16 20:16 libmcrypt
-rw-r--r--  1 root root     8 2008-11-21 18:45 .old_path_httpd_root
drwxr-xr-x  6 root root  4096 2008-11-16 20:11 openssl
drwxr-xr-x  6 root root  4096 2008-11-16 20:27 php
drwxr-xr-x  4 root root  4096 2008-11-16 20:35 scripts
drwxr-xr-x  4 root root  4096 2008-11-16 20:35 standard_cgis
drwxr-xr-x  2 root root  4096 2008-11-16 20:35 sv
-rwx------  1 root root  9389 2008-11-16 20:35 uninstall
The last lines of /home/admispconfig/ispconfig/ispconfig.log:

Code:
21.11.2008 - 14:05:06 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/apache2 reload &> /dev/null
21.11.2008 - 14:05:07 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/postfix stop &> /dev/null
21.11.2008 - 14:05:07 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/postfix start &> /dev/null
21.11.2008 - 14:05:07 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2067: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
21.11.2008 - 18:44:48 => INFO - Signalfile Set: insert
21.11.2008 - 18:44:58 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 259: setquota -g web1 0 0 0 0 -a &> /dev/null
21.11.2008 - 18:44:58 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 260: setquota -T -g web1 604800 604800 -a &> /dev/null
21.11.2008 - 18:44:58 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 279: Connected successfully
21.11.2008 - 18:44:58 => INFO - USER: 
web1_miguel:x:10001:10001:Miguel Pinheiro:/var/www/web1:/bin/bash
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 909: setquota -u web1_miguel 0 0 0 0 -a &> /dev/null
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 910: setquota -T -u web1_miguel 604800 604800 -a &> /dev/null
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web1/.forward
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 117: symlink /var/www/web1/Maildir
21.11.2008 - 18:44:59 => INFO - USER: 
web1_cristina:x:10002:10001:Cristina Garrido:/var/www/web1/user/web1_cristina:/bin/false
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 909: setquota -u web1_cristina 0 0 0 0 -a &> /dev/null
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 910: setquota -T -u web1_cristina 604800 604800 -a &> /dev/null
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web1/user/web1_cristina/.forward
21.11.2008 - 18:44:59 => INFO - USER: 
web1_pedro:x:10003:10001:Pedro No:/var/www/web1/user/web1_pedro:/bin/false
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 909: setquota -u web1_pedro 0 0 0 0 -a &> /dev/null
21.11.2008 - 18:44:59 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 910: setquota -T -u web1_pedro 604800 604800 -a &> /dev/null
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php, Line 60: cp -f /root/ispconfig/isp/conf/forward.master /var/www/web1/user/web1_pedro/.forward
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 137: cp -fr /etc/postfix/local-host-names /etc/postfix/local-host-names~
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 284: cp -fr /etc/postfix/virtusertable /etc/postfix/virtusertable~
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php, Line 289: postmap hash:/etc/postfix/virtusertable
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 1265: cp -fr /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf~
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2601: . /etc/apache2/envvars && httpd -t  &> /dev/null
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2611: httpd syntax ok
21.11.2008 - 18:45:00 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/apache2 reload &> /dev/null
21.11.2008 - 18:45:01 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_bind.lib.php, Line 287: cp -fr /etc/bind/pri.saludterapia.com /etc/bind/pri.saludterapia.com~
21.11.2008 - 18:45:04 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/bind9 restart &> /dev/null
21.11.2008 - 18:45:04 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2067: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/proftpd stop &> /dev/null
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/postfix stop &> /dev/null
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/proftpd start &> /dev/null
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/shell/mail_logs.php, Line 68: touch /var/log/mail.log.ispconfigsave
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/shell/ftp_logs.php, Line 107: cat /dev/null > /var/log/xferlog.www.saludterapia.com
21.11.2008 - 23:59:02 => INFO - /root/ispconfig/scripts/shell/mail_logs.php, Line 69: cat /var/log/mail.log.21-11-08_23-59-02 >> /var/log/mail.log.ispconfigsave
21.11.2008 - 23:59:03 => INFO - /root/ispconfig/scripts/shell/ftp_logs.php, Line 132: rm -f /var/log/xferlog.www.saludterapia.com
21.11.2008 - 23:59:03 => INFO - /root/ispconfig/scripts/shell/ftp_logs.php, Line 135: rm -f /var/log/xferlog.21-11-08_23-59-02
21.11.2008 - 23:59:03 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/init.d/postfix start &> /dev/null
21.11.2008 - 23:59:03 => INFO - /root/ispconfig/scripts/shell/mail_logs.php, Line 145: rm -f /var/log/mail.log.www.saludterapia.com
21.11.2008 - 23:59:03 => INFO - /root/ispconfig/scripts/shell/mail_logs.php, Line 147: rm -f /var/log/mail.log.21-11-08_23-59-02
root@ks32171:/etc/apache2/vhosts#
Content of file home/admispconfig/ispconfig/lib/config.inc.php:

Code:
*/
// Register Globals emulieren, falls notwendig
if(get_cfg_var('register_globals') != 'On') {

    foreach($HTTP_GET_VARS as $getkey => $getval) {
        $$getkey = $getval;
    }
    unset($getkey);
    unset($getval);

    foreach($HTTP_POST_VARS as $postkey => $postval) {
        $$postkey = $postval;
    }
    unset($postkey);
    unset($postval);

    foreach($HTTP_COOKIE_VARS as $cookiekey => $cookieval) {
        $$cookiekey = $cookieval;
    }
    unset($cookiekey);
    unset($cookieval);
}

$go_info = array();

$s = $HTTP_GET_VARS["s"];
if(isset($HTTP_POST_VARS["s"])) $s = $HTTP_POST_VARS["s"];
$s = addslashes($s);
$session = "s=$s";
$set_header = 1;
@session_start();

/**********************************************
* System Settings
**********************************************/

$go_info["server"]["dir_trenner"] = "/";
$go_info["server"]["server_root"] = "/home/admispconfig/ispconfig";

define("DIR_TRENNER","/");
define("SERVER_ROOT","/home/admispconfig/ispconfig");
define("INCLUDE_ROOT",SERVER_ROOT.DIR_TRENNER."lib");
define("CLASSES_ROOT",INCLUDE_ROOT.DIR_TRENNER."classes");
define("DB_TYPE","mysql");

if(isset($_SERVER['HTTP_HOST'])){
  $go_info["server"]["server_url"] = 'http://'.$_SERVER['HTTP_HOST'];
} else {
  $go_info["server"]["server_url"] = "http://www.saludterapia.com:81";
}
$go_info["server"]["include_root"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."lib";
$go_info["server"]["classes_root"] = $go_info["server"]["include_root"] . $go_info["server"]["dir_trenner"] ."classes";
$go_info["server"]["temp_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."temp";
$go_info["server"]["files_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."files";
$go_info["server"]["backup_dir"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."backup";
$go_info["server"]["version"] = "2.2.27";
$go_info["server"]["os"] = "linux";
$go_info["server"]["ort"] = "local";
$go_info["server"]["banner"] = "0";
$go_info["server"]["db_host"] = "localhost";
$go_info["server"]["db_name"] = "db_ispconfig";
$go_info["server"]["db_user"] = "root";
$go_info["server"]["db_password"] = "ckelb9";
$go_info["server"]["db_type"] = "mysql";
$go_info["server"]["mail_server"] = "";
$go_info["server"]["mail_user"] = "";
$go_info["server"]["mail_password"] = "";
$go_info["server"]["smtp_server"] = "localhost";
$go_info["server"]["mode"] = "";
$go_info["server"]["lang"] = "en";

$go_info["server"]["postfix_config"] = 1; // 1 = SENDMAIL-STYLE, 2 = POSTFIX-STYLE
$go_info["server"]["smtp_restart"] = 1; // 1 = stop/start, 2 = restart
$go_info["server"]["network_config"] = 0; // 0 = none, 1 = automatic
$go_info["server"]["sudo_du_enabled"] = 0; // enable sudo for gathering website file usage
$go_info["server"]["apache2_php"] = 'addtype'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)
$go_info["server"]["password_hash"] = 'md5'; // 'crypt' = crypt; 'md5' = crypt-md5
$go_info["server"]["do_automated_backups"] = 0; // 0 = no, 1 = yes; PLEASE NOTE: automated backups might fill up your HDD fast!
$go_info["server"]["ssh_chroot"] = 0;
$go_info["server"]["httpd_check"] = 1;
$go_info["server"]["salutatory_email_charset"] = 'iso-8859-1'; // possible values are iso-8859-1, iso-8859-2, ..., us-ascii, koi8-r (Russian), ...; if no charset is specified, unknown-8bit is assumed.
$go_info["server"]["webdav"] = 0;
$go_info["server"]["force_user_quota"] = 0;
$go_info["server"]["redirect_after_logout"] = ''; // URL to redirect to after logout from ISPConfig; leave empty for default location
$go_info["server"]["redirect_mailuser_after_logout"] = ''; // URL to redirect to after logout from ISPConfig mailuser interface; leave empty for default location

/**********************************************
* Tools Settings
**********************************************/

$go_info["tools"]["zip"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."tools".$go_info["server"]["dir_trenner"]."zip".$go_info["server"]["dir_trenner"]."zip"; // nicht gzip !!
$go_info["tools"]["unzip"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."tools".$go_info["server"]["dir_trenner"]."unzip".$go_info["server"]["dir_trenner"]."unzip";
$go_info["tools"]["imagemagick"]["mogrify"] = "mogrify.exe";

/**********************************************
* Themes Settings
**********************************************/

// Themes Section
$go_info["theme"]["sitename"] = "ISPConfig";
$go_info["theme"]["page"]["box_color"] = "E4E4E4"; // z.B. E4E4E4 , angaben ohne #
$go_info["theme"]["page"]["nav_color"] = "E0E0E0"; // z.B. 025CCA , angaben ohne #
// Die Logo-Datei muss im Verzeichnis /home/admispconfig/ispconfig/web/design/default liegen!
$go_info["theme"]["page"]["logo"] = ""; // z.B. meinlogo.gif
$go_info["theme"]["charset"] = "iso-8859-1";

/**********************************************
* Logging
**********************************************/

$go_info["server"]["log_level"] = 0; // 0 = Debug, 1 = Info, 2 = Warning, 3 = Failure
$go_info["server"]["log_file"] = $go_info["server"]["server_root"] . $go_info["server"]["dir_trenner"] ."ispconfig.log"; // Logdatei
if(is_file("/home/admispconfig/ispconfig/adminmail.txt")){
  $go_info["server"]["log_mail"] = trim(shell_exec("cat /home/admispconfig/ispconfig/adminmail.txt")); // Log Emailadresse
} else {
  $go_info["server"]["log_mail"] = "root@localhost";
}
$go_info["server"]["log_device"] = "FILE"; // FILE, SYSTEM, MAIL

/**********************************************
* Demo Mode Settings
**********************************************/

$go_info["demo"]["web_path"] = "";

/**********************************************
* Localisation Settings
**********************************************/

$go_info["localisation"]["dec_point"] = ",";
$go_info["localisation"]["thousands_sep"] = ".";
$go_info["localisation"]["currency"] = "EUR";

define("CONFIG_LOADED",1);
Running /root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php I got:

Code:
start
ende
Can anyone please help me?

Last edited by miguelpinheiro; 22nd November 2008 at 15:00.
Reply With Quote