Quick Question(s) Apache 2

Discussion in 'Technical' started by linutzy, Jul 28, 2005.

  1. linutzy

    linutzy New Member

    How do you get rid of the default page http://www.example.com/apache2-default/. I just need to get rid of apache2-default and not break my debian apache box.

    Also followed these steps:

    apt-get install webalizer


    <- /var/www/webalizer
    <- Usage Statistics for
    <- /var/log/apache/access.log.1

    However when I access http://www.example.com/webalizer I get the standard browser output:

    Index of /webalizer

    Name Last modified Size Description



    ....and no files are listed. Just wondering if someone can tell me what I might have to look at to get it running properly....By the way great tutorials Falko.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must edit /etc/apache2/sites-available/default and comment out the following line:
    Code:
    RedirectMatch ^/$ /apache2-default/
    Then restart Apache:
    Code:
    /etc/init.d/apache2 restart
    You must run webalizer manually or with a cron job so that it creates statistics in the webalizer directory. Something like

    Code:
    webalizer -n www.example.com -s www.example.com -r www.example.com -q -T -o /var/www/webalizer -c /path/to/webalizer.conf /var/log/apache2/access.log
    might work. See man webalizer for more details.
     
  3. linutzy

    linutzy New Member

    Great!

    I've been at the falkotimme site so many times when doing an install of debian it's sick.

    If I choose to comment the redirect how will it effect any users I create on the debian box. I just want to create a mock web server for learning purposes.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    It won't have any effect on your users. It just tells the Apache not to go to the apache2-default directory by default.
     
  5. linutzy

    linutzy New Member

    From the site.

    On the falkotimme.com debian 3.1 setup link (followed it word for word) you have this.

    Edit /etc/mime.types and comment out the following lines:

    #application/x-httpd-php phtml pht php
    #application/x-httpd-php-source phps
    #application/x-httpd-php3 php3
    #application/x-httpd-php3-preprocessed php3p
    #application/x-httpd-php4 php4

    Edit /etc/apache2/mods-enabled/php4.conf and comment out the following lines:

    <IfModule mod_php4.c>
    # AddType application/x-httpd-php .php .phtml .php3
    # AddType application/x-httpd-php-source .phps
    </IfModule>


    Did you want us to add the "#" because originally they were not there?
    Regardless in /var/www I created a 'phpinfo.php' file.
    When I load the page all I have is this show up and not the php blue and grey variable listing page.

    <?php

    phpinfo();

    ?>

    Did I miss a step and why did you add the comments?
     
    Last edited: Aug 3, 2005
  6. falko

    falko Super Moderator Howtoforge Staff


    Yes, I want you to add the #. This will disable PHP, because this guide is a preparation for the installation of ISPConfig, and in ISPConfig you can enable PHP on a per site basis. If I didn't add the #, then PHP would always be on, no matter you you enable or disable in ISPConfig. If you don't install ISPConfig, then don't add the #.
     
  7. linutzy

    linutzy New Member

    ISPconfig

    Are there any other changes in the debian 3.1 tutorial that you wrote specific to ISPconfig. An example would be the postfix/mysql setup also included?
    Does ISPconfig cost money? I went to the site and all I see is a download link at sourceforge.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is open source and there is not only a download link at the iSPConfig site:

    http://www.ispconfig.org/
     
  9. linutzy

    linutzy New Member


    Cool I am looking through the docs now for ISPConfig. I'm just wondering if the setup done on falkotimme.com for (debian) Mysql and Postfix is a generic setup or if the setup much like the apache setup is related to ISPconfig.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Which setup (URL?) do you mean?
     
  11. linutzy

    linutzy New Member

    That would be the Perfect debian Setup. I notice that the Apache setup was created specifically for ISPconfig as indicated by this thread. I'm wondering if the falkotimme.com debian postfix setup was generic also or ISPconfig specific.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    The howtos written by me on HowtoForge are exactly the same as on falkotimme.com. The Perfect Setup for Debian Woody and that for Debian Sarge are indeed preparing the system for the use of ISPConfig. :)
     
  13. maisy

    maisy New Member

    To get rid of the default page

    http://www.example.com/apache2-default/

    edit /etc/apache2/sites-available/default

    and find on line 17

    and comment out so it looks like this

    then restart apache /etc/init.d/apache2 restart

    P.S don't forget to include a index.html file in your web root, mine is /var/www/index.html

    hope this helps :)
     
  14. nok

    nok New Member

    Last edited: Apr 22, 2011
  15. Absolusteph

    Absolusteph New Member

    all my site go to /var/www/

    I
    I install ISP after a perfect debian setup, all is ok but all my domain are redirected to the default apache 2 web page;
    if i uncomment the redirect in the defautl configuration , apache show the listing of the files... not so good....
    when i create the www.site1.com that redirect in /var/www/default.. instead of /home/web/site1.com/web as it wrote in the isp virtual host file .
    If anybody can help me ....
    thank a lot
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

  17. Absolusteph

    Absolusteph New Member

    Ok scuse me.
     
  18. Absolusteph

    Absolusteph New Member

    do u have find a solution?
     
  19. swones

    swones New Member

    Hi Falko, I'm glad I found my way to this post, perhaps you could put a mention of the above in the Perfect Sarge Setup guide? I quickly realised why the php was not being parsed but was puzzled why it was being disabled in your guide. I understand now but think it would help others to mention this.

    Also I must say "thank you" for providing such an excellent resource. I've learnt so much from the guides here.

    Kind Regards,

    Simon
     
  20. falko

    falko Super Moderator Howtoforge Staff

    You're welcome. :)
     

Share This Page