Ubuntu and ISPConfig, vhost problem

Discussion in 'Installation/Configuration' started by jero, Feb 22, 2008.

  1. jero

    jero New Member

    I want to use two domains on one server. I applied perfect ubuntu server configuration on my server. But i tried to join my sites, apache dont forward to var/www/web*/web folder, it always forward var/www/ folder. how can i fix this problem.
     
  2. till

    till Super Moderator

  3. jero

    jero New Member

    it cant fix my problem.
     
  4. falko

    falko Super Moderator

    What's the output of
    Code:
    ifconfig
    , and what's in Vhosts_ispconfig.conf?
     
  5. jero

    jero New Member

    Code:
    eth0      Link encap:Ethernet  HWaddr *
              inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: * Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:181764 errors:0 dropped:0 overruns:0 frame:0
              TX packets:23606 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:51039973 (48.6 MB)  TX bytes:4224861 (4.0 MB)
              Interrupt:19 Base address:0x2c00
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:531 errors:0 dropped:0 overruns:0 frame:0
              TX packets:531 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:62185 (60.7 KB)  TX bytes:62185 (60.7 KB)

    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost staticip:80
    <VirtualHost staticip:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    
    ######################################
    # Vhost: www.firstdomain.com:80
    ######################################
    #
    #
    <VirtualHost staticip:80>
    ServerName www.firstdomain.com:80
    ServerAdmin webmaster@firstdomain.com
    DocumentRoot /var/www/web9/web
    ServerAlias firstdomain.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/web9/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web9/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web9/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web9/phptmp/
    php_admin_value session.save_path /var/www/web9/phptmp/
    <IfModule mod_ruby.c>
      <Directory /var/www/web9/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>
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web9/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/web9/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web9/user/$1/web/$3
    </VirtualHost>
    
    ######################################
    # Vhost: www.seconddomain.com:80
    ######################################
    #
    #
    <VirtualHost staticip:80>
    ServerName www.seconddomain.com:80
    ServerAdmin webmaster@seconddomain.comt
    DocumentRoot /var/www/web8/web
    ServerAlias seconddomain.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/web8/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web8/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web8/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web8/phptmp/
    php_admin_value session.save_path /var/www/web8/phptmp/
    <IfModule mod_ruby.c>
      <Directory /var/www/web8/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>
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web8/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/web8/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web8/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    
    
     
  6. falko

    falko Super Moderator

    I was interested in the value of staticip, but unfortunately you've hidden that. Anyway, staticip must be 192.168.0.4 because that IP address is listed in the ifconfig output. Please change that in ISPConfig.
     
  7. jero

    jero New Member

    fixed my problem.
    thank you
     

Share This Page