New Site Shows Apache Default page not uploaded index.html

Discussion in 'Installation/Configuration' started by mojosound, Feb 23, 2006.

  1. mojosound

    mojosound New Member

    I am new to this and learning so please bear with me. I have mandriva 2006. I setup ispconfig. My router is assigned ip 216.144.242.27. The pc has a static ip of 192.168.4.2. I created a new site www.cjt-design.com. I set the ip address to 216.144.242.27. I did not set dns, because I have other dns already. This was an existing site, so I changed the zone file a record for www.cjt-design.com to 216.144.242.27. The propogation is still in progress, but I have been able to see that the page that comes up for www.cjt-design.com just shows "It Works" which is the default apache web page for the mandriva linux. I have uploaded an index page that is different through the web ftp. I have tried changing the ip address in the site settings to 192.168.4.2, but this made no difference. I tried to search, but perhaps don't know the right terms to search for. Any help is appreciated.
     
  2. Plascual

    Plascual New Member

  3. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's in your Vhosts_ispconfig.conf?
     
  4. mojosound

    mojosound New Member

    The file Vhost_ispconfig.conf is empty.
     
  5. mojosound

    mojosound New Member

    Upon further research I discovered that there were several files with date and time stamps in their names. I picked the newest one and put into the Vhost_ispconfig.conf file. I was then able to get the site. I tried adding another site but the conf file did not get updated. Again I copied from the file with the newest timestamp and both sites are up. What do I need to do to get this to update?
     
  6. dfriis

    dfriis New Member

    I have the same problem too and since I've reinstalled this machine ten times now I'm starting to get a bit desperate.

    When I comment out
    Code:
    RedirectMatch ^/$ /apache2-default/
    I only see a listing of apache2-default, sharedip and webalizer. You can see what it looks like at http://friisweb.se.

    My Vhosts_ispconfig.conf is NOT blank and looks like it is in order. The file is also included in apache2.conf.

    I've followed the guide for "The perfect setup - debian sarge", but I get this same problem over and over. All looks good, nothing works.

    I will give you all the information you need if you feel like helping me with this.

    Thanks
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    If Vhosts_ispconfig.conf is empty it is likely that some module that is needed is not included in your Apache configuration.
    After you've renamed one of these Vhosts_ispconfig.conf files with a date appended to Vhosts_ispconfig.conf, please run
    Code:
    httpd -t
    What's the output?
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please post the output of
    Code:
    httpd -V
    Anything in the Apache error log?
     
  9. dfriis

    dfriis New Member

    httpd -V gives:

    Server version: Apache/2.0.54
    Server built: Sep 5 2005 11:15:09
    Server's Module Magic Number: 20020903:9
    Architecture: 32-bit
    Server compiled with....
    -D APACHE_MPM_DIR="server/mpm/prefork"
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_SYSVSEM_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D HTTPD_ROOT=""
    -D SUEXEC_BIN="/usr/lib/apache2/suexec2"
    -D DEFAULT_PIDLOG="/var/run/httpd.pid"
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
    -D DEFAULT_LOCKFILE="/var/run/accept.lock"
    -D DEFAULT_ERRORLOG="logs/error_log"
    -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
    -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

    I found one error in the logs. Seems apache is looking in /var/www/web1 for the added site, but standard is /home/www..., isn't it? Changing that in ispconfig makes changes to the added site but I still only see a file listing, and it seems I end up at the server root, not in web1. Should I change it in apache? There's too many things to configure and I'm confused here.
     
  10. mojosound

    mojosound New Member

    [root@cjt-design-server chris]# httpd -V
    Server version: Apache/2.0.54
    Server built: Jan 5 2006 11:10:01
    Server's Module Magic Number: 20020903:9
    Architecture: 32-bit
    Server compiled with....
    -D APACHE_MPM_DIR="server/mpm/prefork"
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_FCNTL_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D HTTPD_ROOT="/etc/httpd"
    -D SUEXEC_BIN="/usr/sbin/suexec"
    -D DEFAULT_PIDLOG="/var/run/httpd.pid"
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
    -D DEFAULT_LOCKFILE="/var/run/accept.lock"
    -D DEFAULT_ERRORLOG="logs/error_log"
    -D AP_TYPES_CONFIG_FILE="conf/mime.types"
    -D SERVER_CONFIG_FILE="conf/httpd.conf"
    [root@cjt-design-server chris]#
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    From you I wanted to see the output of
    Code:
    httpd -t
    , not
    Code:
    httpd -V
     
  12. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please post the error message.
     
  13. mojosound

    mojosound New Member

    Sorry about that:

    [root@cjt-design-server chris]# httpd -t
    Syntax error on line 48 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
    [root@cjt-design-server chris]#

    I am going to try and google for the module.
     
  14. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The missing apache module is mod_php
     
  15. dfriis

    dfriis New Member

    Sorry, as a test I changed the site settings for the server in ispconfig. I changed the dokument root from /home/www to /var/www and then back again, so the former error message I had is now gone and has been replaced with another one. You can see the result at http://friisweb.se and now the error messages in error.log looks like:
    Code:
    [Fri Feb 24 14:48:45 2006] [error] [client 217.***.**.***] (13)Permission denied: access to /web1/Maildir/index.html
    denied, referer: http://friisweb.se/
    I guess that's because of the file structure that now shows when you browse the site so everytime you browse friisweb.se the browser tries to check the mail folder.
    I noticed that both sites-available/default and sites-enabled/000-default has /var/www as document root, but Vhosts_ispconfig.conf has /home/www/web1/web as document root. Still, friisweb.se still points to the same root as friisonline.com, my server domain.
    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 195.38.5.139:80
    <VirtualHost 195.38.5.139:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.friisweb.se:80
    ######################################
    #
    #
    <VirtualHost 195.38.5.139:80>
    ServerName www.friisweb.se:80
    ServerAdmin webmaster@friisweb.se
    DocumentRoot /home/www/web1/web
    ServerAlias friisweb.se
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.$
    ScriptAlias  /cgi-bin/ /home/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /home/www/web1/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 Off
    Alias /error/ "/home/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 ^/~([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    This config file seems to be alright, and so does all the others. What other files would you like me to post? I'll post them all if you want :rolleyes:
     
  16. mojosound

    mojosound New Member

  17. mojosound

    mojosound New Member

    Ok, I missed the LoadModule mod_php5 from the perfect setup. Now I get:
    [root@cjt-design-server chris]# httpd -t
    httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
    [Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
    Syntax OK
    [root@cjt-design-server chris]#

    Everything should be ok now?
     
  18. dfriis

    dfriis New Member

  19. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    That's not serious. Please check at the end of /etc/httpd/conf/httpd.conf if Vhosts_ispconfig.conf is included twice or more. You should have it only once there. If you have to change anything, restart Apache afterwards.
     
  20. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    That's weird. There must be something really mixed up on your system. Please check the ISPConfig database if it uses /home/www everywhere.
    What's at the end of your Apache configuration file? It should look like this:

    Code:
    ###############ispconfig_log###############
    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
    
    <Directory /home/www/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /home/www/*/user/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /home/www/*/cgi-bin>
        Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    Include /etc/apache/vhosts/Vhosts_ispconfig.conf
     

Share This Page