"It works!" and Ubuntu 9.10

Discussion in 'Installation/Configuration' started by demortes, Nov 10, 2009.

  1. demortes

    demortes Member


    I have an issue I ran into before, but can't find the old posts I had. I also have a twist.

    The problem is that when I have everything configured, my site http://demortes.hopto.org still gives the default page for apache2 installation. The "It works!" followed by "This is the default web page for this server." and on a new line, "The web server software is running but no content has been added, yet."

    To explain what I've done, I'll need to explain my network setup as well. ISPConfig 2 is installed on a VMWare Server, through Windows 7 as the host machine. The "guest" is an Ubuntu 9.10 server, no GUI components installed. I followed a guide The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2] (source here). This is all behind a NAT Linksys WRT54GS2 router with the ports forwarded.

    Before installing the ISPConfig through the installer I installed the suPHP according to the Ubuntu section here. I did download the latest, as the one listed there didn't compile. Everything else I configured and compiled just as stated there.

    With the above information, you realize by now I have two IP addresses to consider. My 192.169 and my external. Since any nslookup can give that IP address out, that would be

    I restored a working backup of the ispconfig database, but it seems to not be working now. I would like to confirm, and if needed, get further help on locating what is going wrong and why I'm not getting the ISPConfig page stating it's hosted and the default for ISPConfig, instead of the "It works".

    Now the servers IP address in Management -> Server -> Settings is currently set to my 192.168 address. Everything dependent on that is set as well, the co-domain IP, etc. The DNS is set as that as well, since the hopto.org does not rely on my DNS server for it. The IP address does not give me the sharedip either.

    What do I need to look at to see why ISPConfig's vhost is not taking over vs the /var/www/index.html

    After realizing to myself what the problem might be, I checked the /etc/apache2/vhosts/Vhosts_ispconfig.conf file, and it's blank.

    Thank you for your help, I look forward to receiving the great help I see here all the time. Accept my apologies if this has been covered elsewhere.

    Kevin Dethlefs-Moreno

    P.S. Of course, if you need more information or pastes from actual files, please let me know.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. demortes

    demortes Member

    Thanks for the quick reply.

    What I have taken from the post is to move the Vhosts backup, and check syntax.

    I received the following:

    [email protected]:/etc/apache2/vhosts# mv Vhosts_ispconfig.conf vhosts_ispconfig.conf.bak
    [email protected]:/etc/apache2/vhosts# mv Vhosts_ispconfig.conf_10-11-09_02-31-19 Vhosts_ispconfig.conf
    [email protected]:/etc/apache2/vhosts# httpd -t
    httpd: bad user name ${APACHE_RUN_USER}
  4. demortes

    demortes Member

    Also, looking into it further, I found it needed envvars, which contain:

    # 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

    ## The locale used by some modules like mod_dav
    export LANG=C
    ## Uncomment the following line to use the system default locale instead:
    #. /etc/default/locale

    export LANG
  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. demortes

    demortes Member

    Syntax error on line 36 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

    Looking deeper into this, it seems its because I disabled PHP5 and allowed suPHP globally.

    How should I have done this, if not done by the guide on this site?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to enable suphp in the ispconfig config.inc.php file. See first steps guide for details.
  8. demortes

    demortes Member

    a2enmod php5 gave me some results.

    The sharedip vhost now comes up for my demortes.hopto.org url.

    What am I missing?
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    See my post above.
  10. demortes

    demortes Member

    I got it to work. Thanks for pointing me in the right direction Till.
  11. demortes

    demortes Member

    I prematurely blew the whistle... now the PHP sites that I'm restoring from backup states this in the error.log

    [Tue Nov 10 04:02:24 2009] [error] [client] SecurityException in Application.cpp:511: Unknown Interpreter: php
    [Tue Nov 10 04:02:24 2009] [error] [client] Premature end of script headers: index.php
  12. demortes

    demortes Member

    Nevermind... blew the whistle early twice... corrected permissions, good to go.

    Why, however, do I need chmod 755 on my php files, when I should be able to do chmod 770 in my head? Am I not understanding the purpose of suPHP?
  13. demortes

    demortes Member

    Nope, something still aint right.

    Now I'm getting error 500. Error.log still has those same errors.

    Please help
  14. falko

    falko Super Moderator ISPConfig Developer

    What's in your suphp.conf? Which suPHP version do you use?
  15. demortes

    demortes Member

    0.7.1, and

    ;Path to logfile


    ;User Apache is running as

    ;Path all scripts have to be in

    ;Path to chroot() to before executing script

    ; Security options

    ;Check wheter script is within DOCUMENT_ROOT

    ;Send minor error messages to browser

    ;PATH environment variable

    ;Umask to set, specify in octal notation

    ; Minimum UID

    ; Minimum GID

    ;Handler for php-scripts

    ;Handler for CGI-scripts

    Oh... I need permissions 770...
  16. demortes

    demortes Member

    I think this is fixed.

    Fixed by putting the quotations around:




    I do have some concern about suPHP, but that's not for this thread.

Share This Page