16 Replies Latest reply on Nov 17, 2008 9:57 AM by bregent

    index.php instead of index.html

    supergrabbit Level 1
      Yahoo ! I have made it to one level but need help to the next !
      I set up home hosting on Windows XP Pro using a web tutorial.
      My next question is : How one changes settings to use "index.php" instead of "index.html" as the homepage using Apache ? Thank you muchly.
      Amanda
        • 1. index.php instead of index.html
          leoserra Level 2
          I supergrabbit... I'm suposing that you are using IIS in Windows XP Pro. Normally IIS should read index.php by omission, but if not the case you have to set the home page as the index.php.

          Since I don't use IIS I don't know by heart, all the steps you have to make, but everything goes in the Control Panel.

          Here's a link that will try to explain it to you. Hope it helps

          http://www.chami.com/tips/windows/121496W.html
          • 2. Re: index.php instead of index.html
            supergrabbit Level 1
            Hi leoserra
            I use Apache Leoserra
            Amanda Nguyen
            • 3. Re: index.php instead of index.html
              leoserra Level 2
              sorry :)

              In apache directory you must have a "conf" folder. Inside it locate a file called httpd.conf (maybe you must do this in a file called srm.conf as well). If you don't find them search them using windows Searrch.

              Once you locate it, open it using Notepad, or other text editor, and locate a line wich has "DirectoryIndex" at the beggining.

              Add index.php to the list you see. Hope this works... this time;)

              I have installed XAMMP, and I didn't had the need to do this... just program and go.

              Maybe you need to restart Apache after this.

              My httpd.conf:
              DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
              • 4. Re: index.php instead of index.html
                supergrabbit Level 1
                I have added index.php to the list in the file "httpd.conf" using Notepad.

                <IfModule dir_module>
                DirectoryIndex index.html index.htm index.php index.shtml index.shtm
                </IfModule>

                After restarting Apache and trying to open the site in a browser, I saw the correct file "index.php" on my computer, but a friend of mine (he is in Canada, I am in Denmark) could only see the source code.

                I found an article on the web, it advices me to install PHP and I did. Now both him and me encounter an error page upon opening the site in a browser.

                Do you have any idea to correct that

                Thank you muchly
                Amanda Nguyen




                • 5. Re: index.php instead of index.html
                  Level 7
                  I don't know about relating apache with IIS, but I do know how to add a
                  default page in IIS.
                  here is the procedure

                  Click Start
                  Click Control Panel
                  Double Click Administrative tools
                  Double click Internet Information Services
                  On the left pane you should see your computer by name
                  Double click your computer name
                  Double click Web Site
                  Right click Default WEb site
                  Choose properties
                  Click the tab Documents
                  In there click the add button
                  write in the text box index.php
                  click OK
                  and you should see in the list the new default document
                  Click OK and your done.

                  Now will It work?

                  aka Frenchy ASP
                  "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                  news:gfkevq$di7$1@forums.macromedia.com...
                  >I have added index.php to the list in the file "httpd.conf" using Notepad.
                  >
                  > <IfModule dir_module>
                  > DirectoryIndex index.html index.htm index.php index.shtml index.shtm
                  > </IfModule>
                  >
                  > After restarting Apache and trying to open the site in a browser, I saw
                  > the
                  > correct file "index.php" on my computer, but a friend of mine (he is in
                  > Canada,
                  > I am in Denmark) could only see the source code.
                  >
                  > I found an article on the web, it advices me to install PHP and I did. Now
                  > both him and me encounter an error page upon opening the site in a
                  > browser.
                  >
                  > Do you have any idea to correct that
                  >
                  > Thank you muchly
                  > Amanda Nguyen
                  >
                  >
                  >
                  >
                  >
                  >


                  • 6. Re: index.php instead of index.html
                    Level 7
                    here is somthing that could be related to your problem

                    Basis...
                    IIS and Apache will default to listening on Port 80 (the http port).
                    IIS will also listen on all IP by default (even if you specify an ip for
                    your http service in the IIS managment console).
                    Apache will listen on the IP (one or more) you specify in httpd.conf

                    But it's not possible for two apps to share the same port for the same
                    IP, which explains your trouble.

                    You have two solution to this problem depending the number of IP your
                    machine are hosting.

                    -> Only one IP
                    So, you need to change the port of one of the servers. One can listen
                    on Port 80, the other on Port 8080 (or whatever).

                    To change IIS to a new port :
                    - IIS managment console : open the property page for your site (or the
                    default if you wish to change all the site you are hosting) and switch
                    "TCP Port" to an other value.
                    - Web console : I just clicked through the Web-based config screens
                    until I found the spot for changing the port. Try it.
                    Restart all the IIS services

                    To change Apache to a new port :
                    open httpd.conf and look for two lines, one is "Listen 80" (or listen
                    YourIpAdress:80) and the other is "Port 80". Change them to a different
                    number, perhaps like this:
                    Port 8080
                    Listen 8080

                    Then save the file and restart the server. Now you can have Apache
                    running and IIS running. One will run on the default 80 port, so
                    http://www.mysite.com/ should work ("mysite" should be the name of your
                    site, of course). The other will run on a different port, and will
                    need to be specified, like this:

                    http://www.mysite.com:8080/

                    "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                    news:gfk8hs$55h$1@forums.macromedia.com...
                    > Yahoo ! I have made it to one level but need help to the next !
                    > I set up home hosting on Windows XP Pro using a web tutorial.
                    > My next question is : How one changes settings to use "index.php" instead
                    > of
                    > "index.html" as the homepage using Apache ? Thank you muchly.
                    > Amanda
                    >


                    • 7. Re: index.php instead of index.html
                      supergrabbit Level 1
                      Dear Alain St. Pierre:

                      Thank you for your helpful information that I am most greatful for. They will continue to be part of my knowledge base whilst building a selfhosting site.
                      But for now I'm just a baby taking little baby steps .... hehehe ! I have a bewitching issue of no small matter however. My friend in Canada can only see the source view of the homepage index.php . How can I resolve that ? What is going on with that ?
                      Again , with much thanks Amanda Nguyen .
                      • 8. Re: index.php instead of index.html
                        Level 7
                        It probably what I have said. He is using the default port with http witch
                        is port 80. You need to change your apache port to another one like 8080
                        and then give him your adress as so
                        http://x.y.z.z:8080

                        By default IIS do not read php file this is why his browser want to open it.
                        Just follow theses instruction like I mention before to change the default
                        port for the apache server to another one.

                        Remember to open your firewall and redirect the new port to your PC if you
                        have one (firewall).

                        This is assuming that your php server is working.

                        aka Frenchy ASP.

                        ps where in Canada
                        "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                        news:gfkt5u$220$1@forums.macromedia.com...
                        > Dear Alain St. Pierre:
                        >
                        > Thank you for your helpful information that I am most greatful for. They
                        > will
                        > continue to be part of my knowledge base whilst building a selfhosting
                        > site.
                        > But for now I'm just a baby taking little baby steps .... hehehe ! I have
                        > a
                        > bewitching issue of no small matter however. My friend in Canada can only
                        > see
                        > the source view of the homepage index.php . How can I resolve that ? What
                        > is
                        > going on with that ?
                        > Again , with much thanks Amanda Nguyen .
                        >


                        • 9. Re: index.php instead of index.html
                          Level 7
                          Or better yet just stop the IIS service.
                          "Alain St-Pierre" <alainetcolleen@hotmail.com> wrote in message
                          news:gfktmn$2nd$1@forums.macromedia.com...
                          > It probably what I have said. He is using the default port with http
                          > witch is port 80. You need to change your apache port to another one like
                          > 8080 and then give him your adress as so
                          > http://x.y.z.z:8080
                          >
                          > By default IIS do not read php file this is why his browser want to open
                          > it. Just follow theses instruction like I mention before to change the
                          > default port for the apache server to another one.
                          >
                          > Remember to open your firewall and redirect the new port to your PC if you
                          > have one (firewall).
                          >
                          > This is assuming that your php server is working.
                          >
                          > aka Frenchy ASP.
                          >
                          > ps where in Canada
                          > "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                          > news:gfkt5u$220$1@forums.macromedia.com...
                          >> Dear Alain St. Pierre:
                          >>
                          >> Thank you for your helpful information that I am most greatful for. They
                          >> will
                          >> continue to be part of my knowledge base whilst building a selfhosting
                          >> site.
                          >> But for now I'm just a baby taking little baby steps .... hehehe ! I have
                          >> a
                          >> bewitching issue of no small matter however. My friend in Canada can only
                          >> see
                          >> the source view of the homepage index.php . How can I resolve that ? What
                          >> is
                          >> going on with that ?
                          >> Again , with much thanks Amanda Nguyen .
                          >>
                          >
                          >


                          • 10. Re: index.php instead of index.html
                            supergrabbit Level 1
                            I dont have PHP on the computer which is running the Apache.
                            I made the site on another computer which has the PHPcorrectly installed and then copied and pasted the whole site into the htdocs folder inside the computer which is running the Apache.
                            So should I install PHP on the computer which is running the Apache ?

                            Amanda Nguyen
                            • 11. Re: index.php instead of index.html
                              bregent Most Valuable Participant
                              >I set up home hosting on Windows XP Pro using a web tutorial.

                              Home hosting? Are you just setting up a test/development server, or are you actually planning on running a web/app server from your home?
                              • 12. Re: index.php instead of index.html
                                supergrabbit Level 1
                                I am planning on running a web/app server from my home, Bregent.
                                What web tutorial did you use, , Bregent?
                                Amanda
                                • 13. Re: index.php instead of index.html
                                  Level 7
                                  >I am planning on running a web/app server from my home

                                  THAT'S A VERY BAD IDEA. You will need to be very savvy about security
                                  issues, and will run the risk of having your ISP account cancelled if your
                                  ISP finds out you are doing this.

                                  --
                                  Murray --- ICQ 71997575
                                  Adobe Community Expert
                                  (If you *MUST* email me, don't LAUGH when you do so!)
                                  ==================
                                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                                  ==================


                                  "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                                  news:gfmn70$for$1@forums.macromedia.com...
                                  , Bregent.
                                  > What web tutorial did you use, , Bregent?
                                  > Amanda
                                  >

                                  • 14. Re: index.php instead of index.html
                                    supergrabbit Level 1
                                    Dear Murray
                                    All I'm attempting to do is learn the technical aspects of developing the framework to self host & then to move onto being to webhosting. Then I will consult my ISP to discuss with them what I have to initiate together with them to accomplish that.
                                    Amanda Nguyen
                                    • 15. Re: index.php instead of index.html
                                      Level 7
                                      Good luck. Self hosting is a huge security risk.

                                      --
                                      Murray --- ICQ 71997575
                                      Adobe Community Expert
                                      (If you *MUST* email me, don't LAUGH when you do so!)
                                      ==================
                                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                                      ==================


                                      "supergrabbit" <webforumsuser@macromedia.com> wrote in message
                                      news:gfpc9q$3dm$1@forums.macromedia.com...
                                      > Dear Murray
                                      > All I'm attempting to do is learn the technical aspects of developing the
                                      > framework to self host & then to move onto being to webhosting. Then I
                                      > will
                                      > consult my ISP to discuss with them what I have to initiate together with
                                      > them
                                      > to accomplish that.
                                      > Amanda Nguyen
                                      >
                                      >

                                      • 16. Re: index.php instead of index.html
                                        bregent Most Valuable Participant
                                        >I am planning on running a web/app server from my home, Bregent.
                                        >What web tutorial did you use, , Bregent?

                                        I didn't use any tutorial. I would never consider hosting a website from home for a whole host (hehe) of reasons:

                                        1) It's not cost effective
                                        2) uses too much personal bandwidth
                                        3) Security issues - I don't have a real firewall or have the knowledge to configure one
                                        4) It's a violation of the TOS of my ISP
                                        5) Broadband uploads speeds too slow for good performance
                                        6) Don't want to have to monitor my site 24x7 for attacks or hardware problems
                                        7) Good, reliable, and well supported hosting is cheap!!

                                        You mention later in a post to Murray that you learning the tech aspects so you can later move into the web hosting space. If that's true, the you may be better off leasing a dedicated server for this, rather than self hosting. Then at least many of the security issues will be handled by the host. But I really wonder how much you have studied the business of running your own web hosting? Do you understand the hosting business models? Web hosting is a commodity - you need very large volumes to be profitable. Small scale hosting is not very profitable and you will probably end up working long hours for low wages.
                                        I imagine these days you'll need several thousand accounts before you are breaking even. This can take years and you will need a lot of capital to maintain your business during this time.
                                        Unless you find a niche and can charge higher than standard rates you are probably be headed for a disappointment. I also wonder why you are focusing on running PHP on IIS? What about ASP and ASP.NET or runing *nix servers? Given your other posts and how much more you need to learn, I would say that self hosting a website is not a good idea.