question about Apache+Php+MySql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Huang

    #1

    question about Apache+Php+MySql

    Hi,

    I setup a LAMP enviroment on my laptop, and did related config on my apache
    and linux as well.

    But each time I visit my http://localhost, I was only been brought to
    index.html instead of index.php.

    Only when I tpye http://localhost/index.php, I can open the index.php page.

    Any one know how to config this?

    Thanks!

    Dan


  • JScoobyCed

    #2
    Re: question about Apache+Php+MySq l

    "Daniel Huang" <danielhuang@ho tmail.com> :[color=blue]
    > But each time I visit my http://localhost, I was only been brought to
    > index.html instead of index.php.
    >
    > Only when I tpye http://localhost/index.php, I can open the index.php[/color]
    page.

    Hi.

    In the httpd.conf, search for the line :
    DirectoryIndex index.html index.html.var
    (the file might be differents). If you didn't do it yet, add the index.php
    in first position, as Apache will read from left to right in case both file
    exist:
    DirectoryIndex index.php index.html index.html.var index.htm


    Comment

    • João Proença

      #3
      Re: question about Apache+Php+MySq l

      If i'm not wrong, in the httpd.conf you can set the "open" page on the
      DirectoryIndex:

      # DirectoryIndex: Name of the file or files to use as a pre-written HTML
      # directory index. Separate multiple entries with spaces.
      #
      <IfModule mod_dir.c>
      DirectoryIndex index.html index.php
      </IfModule>

      João Proença

      "Daniel Huang" <danielhuang@ho tmail.com> wrote in message
      news:c2r5mf$ccg 0$1@netnews.upe nn.edu...[color=blue]
      > Hi,
      >
      > I setup a LAMP enviroment on my laptop, and did related config on my[/color]
      apache[color=blue]
      > and linux as well.
      >
      > But each time I visit my http://localhost, I was only been brought to
      > index.html instead of index.php.
      >
      > Only when I tpye http://localhost/index.php, I can open the index.php[/color]
      page.[color=blue]
      >
      > Any one know how to config this?
      >
      > Thanks!
      >
      > Dan
      >
      >[/color]


      Comment

      • Guillaume Brocker

        #4
        Re: question about Apache+Php+MySq l

        JScoobyCed wrote:[color=blue]
        > page.
        >
        > Hi.
        >
        > In the httpd.conf, search for the line :
        > DirectoryIndex index.html index.html.var
        > (the file might be differents). If you didn't do it yet, add the index.php
        > in first position, as Apache will read from left to right in case both file
        > exist:
        > DirectoryIndex index.php index.html index.html.var index.htm[/color]

        And of course, don't forget to restart apache with 'apachectl restart'.

        Just in case :)

        --
        Guillaume Brocker

        Comment

        Working...