vhosts not working?

Discussion in 'General' started by dagg, Sep 13, 2008.

  1. dagg

    dagg New Member

    i finally got ispconfig installed, and went to add the first domain, but no matter what i do, all i get is the "it works!" apache2-default page.
    i did take a look at the vhosts.conf file and its completely empty.

    I removed the domain and tried adding it back in, nothing changed and im still stuck at the same spot.

    Sorry if this is a dumb question, this is my first real web server that i have put together so any help would be great.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Make sure that you selcetd the correct IP address for the site. If your server is behind a router, you will have to use the internal and not the external IP address.

    Also make sure that youz followed exactly the perfect setup guide for your linux distribution as you installed ispconfig.
     
  3. dagg

    dagg New Member

    IP is correct and yes, followed the step by step exactly.... no issues with OS setup or installing ISPconfig this go round.
     
  4. dagg

    dagg New Member

    ok.. i had a friend get into the box and start digging around....
    even though i followed the instructions to the letter... i wound up getting two instances of apache2 running at the same time.

    that appears to be where my problems are coming from per him.
    his suggestion to how to fix it however is to start from scratch with a fresh install of the OS which is not as easy as it sounds (server is in a remote location and I cant get there for a LONG while).

    id rather not have to reinstall the OS again, and he has never looked at ispconfig before so he isnt 100% sure of how its setting things up...
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I'am not sure if your frined is familar with ispconfig, otherwise he might have mixed several things totally up. On a ISPCOnfoig setup, you MUST have two different apache servers running. One runs on port 80 and 443, this is the apache that serves your websites and the other one is running on port 81 and serves the controlpanel only.

    ISPConfig does not use a file called vhosts.conf, maybe you mean the file Vhosts_ispconfig.conf??

    Are there several copies of the file Vhosts_ispconfig.conf in the same directory with a date appended to the name?
     
  6. dagg

    dagg New Member

    no.. he isnt familiar with it... but thanks for that info, that would explain a couple things.

    yes, there are several of them with appended dates.

    and i do have a Vhosts_ispconfig.conf file in there that is apparently blank. (as in, the file exists, but there is nothing in that config at all)
    The configs with appended dates look normal however.
     
    Last edited: Sep 14, 2008
  7. falko

    falko Super Moderator ISPConfig Developer

  8. dagg

    dagg New Member

    output of httpd -t is:

    Syntax error on line 52 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You missed to install or enable mod_php. Please install the packages as described in the perfect setup guide for your linux distribution.
     
  10. dagg

    dagg New Member

    ok... got that fixed....
    now im getting the shared IP page.

    I do know that the IP is correct and not currently behind a firewall
    so no im tracking down that problem...

    (edit)
    i checked ifconfig against the current vhosts file and the IP addressing is correct in both

    Till, thanks, i do remember that being in the setup, which i ran through step by step, but obviously i must have accidentally bypassed that one.
     
    Last edited: Sep 15, 2008
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you wont get that page. Please post the vhost configuration for that domain from the Vhost_ispconfig.conf file.
     
  12. dagg

    dagg New Member

    Ok, i think i have just about everything working now... but i have one remaining problem which may be related.

    when i type the root domain in a browser, i get the shared IP page... when i type in www.rootdomain.tld, i get the default welcome page.

    and, i added a subdomain of test.domain2.tld, the NS lookup is working and sending to the correct IP address, but i still get the shared IP page... almost as if the new subdomain is not actually being added to the zone files.... im just not sure if thats a problem in the vhosts file or in bind or somewhere else....?
     
  13. dagg

    dagg New Member


    well, backed up the original, renamed the latest one with the date to .conf and it WAS working. now its overwritten the vhosts_ispconfig.conf with a blank document and now im getting another .conf with a ~ at the end.

    so there isnt anything that i can give you because im back to a blank .conf....

    (edit)
    also, when I make any change at all, delete or re-create the domains or add a single zone file, the version of Vhosts_ispconfig.conf that gets overwritten is blank and it creates that new one with the ~ at the end now...
     
    Last edited: Sep 16, 2008
  14. dagg

    dagg New Member

    im getting somewhere (i think)
    I removed all clients and sites and started from scratch. The first domain worked correctly when i browse to the root of domain1.tld... but any new A records do not work, i just get the shared IP.
    New domain2.tld obviously is now getting written to the .conf file correctly, but all i get from that no matter what i try to go to is the shared IP page.

    here is my vhosts_ispconfig.conf:
    i have replaced the actual IP with 1.1.1.1 but i did verify that they are correct and match my ifconfig output (which is under the .conf output)
    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 1.1.1.1:80
    <VirtualHost 1.1.1.1:80>
      ServerName localhost
      ServerAdmin [email protected]
      DocumentRoot /var/www/sharedip
      <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
        RewriteRule .* - [F]
      </IfModule>
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: domain1.tld:80
    ######################################
    #
    #
    <VirtualHost 1.1.1.1:80>
    SuexecUserGroup nobody web8
    ServerName domain1.tld:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web8/web
    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>
    <IfModule mod_python.c>
     <Directory /var/www/web8/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 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/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
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: domain2.tld:80
    ######################################
    #
    #
    <VirtualHost 1.1.1.1:80>
    SuexecUserGroup nobody web9
    ServerName domain2.tld:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web9/web
    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>
    <IfModule mod_python.c>
     <Directory /var/www/web9/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/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
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:30:48:74:23:DE
              inet addr:1.1.1.1  Bcast:1.1.1.2  Mask:255.255.255.252
              inet6 addr: fe80::230:48ff:fe74:23de/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:261216 errors:0 dropped:0 overruns:0 frame:0
              TX packets:220887 errors:486 dropped:0 overruns:0 carrier:486
              collisions:28843 txqueuelen:10
              RX bytes:180417792 (172.0 MiB)  TX bytes:41875324 (39.9 MiB)
              Base address:0xb400 Memory:fd8c0000-fd8e0000
    
    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:9973 errors:0 dropped:0 overruns:0 frame:0
              TX packets:9973 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:815536 (796.4 KiB)  TX bytes:815536 (796.4 KiB)
    
    again, replaced the actual IP with 1.1.1.1 and the broadcast with 1.1.1.2 but they are correct and match.
     
  15. falko

    falko Super Moderator ISPConfig Developer

  16. dagg

    dagg New Member

    both....
    i set it up as the root... same way i set up domain1.tld

    none of the A records are working either however.. only thing working is the first domain & thats it.
     
    Last edited: Sep 16, 2008
  17. dagg

    dagg New Member

    in digging around the forums, i noticed some references to going inot the co-domains tab.. so i decided to look in there... i get the following error:

    The name www.domain2.tld is already in use by another site or domain.

    could that be where part of my problem is? if so, how do i correct this?

    (edit)
    yes.. thats it!
    i just created a new test domain and everything workd.. so i have to create the subs from that co-domain tab when creating it in order for them to work.
    I think it would be a great idea to move all of that into the DNS section and not require it to be that way... much easier and makes more sense that way
     
    Last edited: Sep 16, 2008
  18. dagg

    dagg New Member

    i have one last configuration issue...
    when i go to create domain2.tld it says that there is already a security certificate and will not let me create it the same way i redid domain1.tld...
    it forces me to create the site using www as a host for the domain which winds up giving me the shared IP page when i create any new records for that domain.

    (edit)
    fixed it... im not sure how... but i did.
    (another edit)
    no i didnt... for some reason on this ONE domain, it keeps putting www in the host for the domain.... which i cant do because it winds up giving me the shared IP page every single time.
    it also will not let me just remove it and save that... it keeps coming back.
     
    Last edited: Sep 17, 2008
  19. falko

    falko Super Moderator ISPConfig Developer

    Ok, what's the domain that's giving you problems, and what's in your real Vhosts_ispconfig.conf?
     
  20. dagg

    dagg New Member

    well, i guess i dont really have much choice on this but to just give up and move to another package.

    i removed the offending domain and re-entered it AND THATS ALL and now the domain that WAS working, is doing the exact same thing...

    i cant have this going on and its clearly NOT a problem between the vhosts conf and the IP addressing... this package just clearly does not handle DNS the way i need it to.

    not saying there isnt something goin on with my machine, but i have already ripped the whole thing down and reimaged the machine twice... this is not working...

    thanks guys for the help you did offer, its appriciated.
     

Share This Page