+ Reply to Thread
Results 1 to 6 of 6

Thread: installing Apache in Localhost.

  1. #1
    naim4u's Avatar
    naim4u is offline x10Hosting Member naim4u is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    51

    installing Apache in Localhost.

    configuring php on localhost - Today, 08:15 AM



    Before we install Apache, we need to make sure the Windows Internet Information Server (IIS) is disabled (if it is installed and running). The reason is that IIS and Apache are both web servers and they will conflict if they are both running at the same time. Note that if you want continue to use IIS (e.g. for local ASP.NET website development), you will be able to easily switch IIS and Apache on and off so you can use both. This step just tells you how to switch IIS off temporarily so we can install Apache.

    to make sure IIS is not running, do the following: Start | Settings | Control Panel | Administrative Tools | Services. Then click on column label "Name" to list the services in reverse alphabetical order. If IIS is running then you will see an entry named "World Wide Web Publishing" at the top. Click on that and then click the stop button.

    We now need to tell the Apache web server what to do when it encounters a .php5 file. Some changes will be made to the Apache configuration file and some will be made to the PHP configuration file
    1. With the Windows Explorer, create the folder c:\webs\test. This will be our test website
    2. Rename the c:\php\php.ini-dist to c:\php\php.ini, then make the following changes in the c:\php\php.ini file: (1) doc_root = "c:\webs\test" and (2) extension_dir = "C:\php\ext". Note that you should use BACKSLASHES in the php.ini file.

    3. In the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the DocumentRoot entry to: DocumentRoot "C:/webs/test". Note that you should use FORWARD SLASHES in the http.conf file.

    4. Also in the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the Directory entry to: <Directory "C:/webs/test">.Note that you should use FORWARD SLASHES in the http.conf file.

    5. Again in the C:\Program Files\Apache Group\Apache2\conf\httpd.conf file, add the following lines: hint: to find this position fast, search for "media types"
    Quote:
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php .php5
    Action application/x-httpd-php "/php/php-cgi.exe"
    SetEnv PHPRC "C:/php"
    6. Lastly, we need to make one last change to this C:\Program Files\Apache Group\Apache2\conf\httpd.conf file. Find the "DirectoryIndex" entry and add "index.php" to the end of the line
    Quote:
    DirectoryIndex index.html index.html.var index.php5
    7. In order for the changes to take effect, you need to restart Apache. To do this, click the Apache symbol in the lower right-hand corner of your task bar. In the little menu that pops up there, click Apache 2 and then Restart
    Edit:
    Before we install Apache, we need to make sure the Windows Internet Information Server (IIS) is disabled (if it is installed and running). The reason is that IIS and Apache are both web servers and they will conflict if they are both running at the same time. Note that if you want continue to use IIS (e.g. for local ASP.NET website development), you will be able to easily switch IIS and Apache on and off so you can use both. This step just tells you how to switch IIS off temporarily so we can install Apache.

    to make sure IIS is not running, do the following: Start | Settings | Control Panel | Administrative Tools | Services. Then click on column label "Name" to list the services in reverse alphabetical order. If IIS is running then you will see an entry named "World Wide Web Publishing" at the top. Click on that and then click the stop button.

    We now need to tell the Apache web server what to do when it encounters a .php5 file. Some changes will be made to the Apache configuration file and some will be made to the PHP configuration file
    1. With the Windows Explorer, create the folder c:\webs\test. This will be our test website
    2. Rename the c:\php\php.ini-dist to c:\php\php.ini, then make the following changes in the c:\php\php.ini file: (1) doc_root = "c:\webs\test" and (2) extension_dir = "C:\php\ext". Note that you should use BACKSLASHES in the php.ini file.

    3. In the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the DocumentRoot entry to: DocumentRoot "C:/webs/test". Note that you should use FORWARD SLASHES in the http.conf file.

    4. Also in the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the Directory entry to: <Directory "C:/webs/test">.Note that you should use FORWARD SLASHES in the http.conf file.

    5. Again in the C:\Program Files\Apache Group\Apache2\conf\httpd.conf file, add the following lines: hint: to find this position fast, search for "media types"
    Quote:
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php .php5
    Action application/x-httpd-php "/php/php-cgi.exe"
    SetEnv PHPRC "C:/php"
    6. Lastly, we need to make one last change to this C:\Program Files\Apache Group\Apache2\conf\httpd.conf file. Find the "DirectoryIndex" entry and add "index.php" to the end of the line
    Quote:
    DirectoryIndex index.html index.html.var index.php5
    7. In order for the changes to take effect, you need to restart Apache. To do this, click the Apache symbol in the lower right-hand corner of your task bar. In the little menu that pops up there, click Apache 2 and then Restart
    Edit:
    Before we install Apache, we need to make sure the Windows Internet Information Server (IIS) is disabled (if it is installed and running). The reason is that IIS and Apache are both web servers and they will conflict if they are both running at the same time. Note that if you want continue to use IIS (e.g. for local ASP.NET website development), you will be able to easily switch IIS and Apache on and off so you can use both. This step just tells you how to switch IIS off temporarily so we can install Apache.

    to make sure IIS is not running, do the following: Start | Settings | Control Panel | Administrative Tools | Services. Then click on column label "Name" to list the services in reverse alphabetical order. If IIS is running then you will see an entry named "World Wide Web Publishing" at the top. Click on that and then click the stop button.

    We now need to tell the Apache web server what to do when it encounters a .php5 file. Some changes will be made to the Apache configuration file and some will be made to the PHP configuration file
    1. With the Windows Explorer, create the folder c:\webs\test. This will be our test website
    2. Rename the c:\php\php.ini-dist to c:\php\php.ini, then make the following changes in the c:\php\php.ini file: (1) doc_root = "c:\webs\test" and (2) extension_dir = "C:\php\ext". Note that you should use BACKSLASHES in the php.ini file.

    3. In the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the DocumentRoot entry to: DocumentRoot "C:/webs/test". Note that you should use FORWARD SLASHES in the http.conf file.

    4. Also in the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf, change the Directory entry to: <Directory "C:/webs/test">.Note that you should use FORWARD SLASHES in the http.conf file.

    5. Again in the C:\Program Files\Apache Group\Apache2\conf\httpd.conf file, add the following lines: hint: to find this position fast, search for "media types"
    Quote:
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php .php5
    Action application/x-httpd-php "/php/php-cgi.exe"
    SetEnv PHPRC "C:/php"
    6. Lastly, we need to make one last change to this C:\Program Files\Apache Group\Apache2\conf\httpd.conf file. Find the "DirectoryIndex" entry and add "index.php" to the end of the line
    Quote:
    DirectoryIndex index.html index.html.var index.php5
    7. In order for the changes to take effect, you need to restart Apache. To do this, click the Apache symbol in the lower right-hand corner of your task bar. In the little menu that pops up there, click Apache 2 and then Restart the apache which is at the right side of start menu

  2. #2
    Jesse's Avatar
    Jesse is offline Lord Of The Keys Jesse is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    Manila, PH
    Posts
    1,357

    Re: installing Apache in Localhost.

    Thanks for this info. I saved it to my computer, it might help me someday when i try to setup one ;)
    x10HOSTING
    Member Since October 2007.

    JESSEMAN.ME
    | iMusicz.net

  3. #3
    Dan's Avatar
    Dan
    Dan is offline
    Lord Of The Keys Dan is an unknown quantity at this point
    Join Date
    Aug 2007
    Location
    UK
    Posts
    1,258

    Re: installing Apache in Localhost.

    Very good!! I've saved it too for future reference.
    Thanks,
    Dan
    _______________
    Retired Staff

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    624

    Re: installing Apache in Localhost.

    Great Tutorial Man,

    Thanks for the help
    If you like my posts please REP me!!!

  5. #5
    satheesh's Avatar
    satheesh is offline x10 Elder satheesh is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Tamil Nadu,India
    Posts
    883

    Re: installing Apache in Localhost.

    Nice.
    I want to buy Some Scripts So Please Click This link:http://affiliate.tufat.com/index.php?id=4384
    Please rate my site:Click here




  6. #6
    Daniel S's Avatar
    Daniel S is offline x10 Spammer Daniel S is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    2,395

    Re: installing Apache in Localhost.

    thanks great info
    -Daniel S, X10 Senior Account Manager.

+ Reply to Thread

Similar Threads

  1. Cpanel upgrade apache thing again, and 404
    By Mashy in forum Free Hosting
    Replies: 17
    Last Post: 12-01-2007, 01:51 AM
  2. Dumb Apache Page Instead!!!!
    By Marpole in forum Free Hosting
    Replies: 5
    Last Post: 09-28-2007, 08:40 AM
  3. Setting up a localhost for beginers(me)!
    By DefecTalisman in forum Scripts & 3rd Party Apps
    Replies: 6
    Last Post: 09-13-2007, 09:38 AM
  4. Apache 2.2.3 Stuffed Up :(
    By TheJeffsta in forum Computers & Technology
    Replies: 0
    Last Post: 12-15-2006, 05:17 PM
  5. Apache server: configure your own server
    By chitwa in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 09-19-2005, 05:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers