Installing Php5 On Apache 2.2

Posted on by

Technical Jargon. Last month I posted about hosting a git server under IIS by using Git. Aspx. While this is certainly one way to host a git server on windows, I wouldnt recommend this in a production environment. An alternative and somewhat more stable approach is to use the native implementation of git http backend that ships with msysgit along with Apache. Step 1 Install Git. Firstly youll need to install msysgit. The current stable version is 1. Installing Php5 On Apache 2.2' title='Installing Php5 On Apache 2.2' />Be sure to select Run git from the Windows Command prompt when the installer asks you if you want to modify your PATH variable. Once installed, youll need to tweak the installation slightly. By default, the git http server is located at C Program Files x. Gitlibexecgit coregit http backend. Hello, WampServer 2. Apache 2. 4. 9, PHP 5. MySQL 5. 6. 17 is now available on the home page of Wampserver. This is also available from Sourceforge WampServer. Downloading the Apache HTTP Server Use the links below to download the Apache HTTP Server from one of our mirrors. You must verify the integrity of the downloaded. Instalacin de Apache 1. Caso A Instalacin de Apache 1. X 1. 2 Caso B Instalacin de Apache 2. X 2 Instalacin de PHP 2. Copia de. XAMPP is an easy to install Apache distribution containing MariaDB, PHP and Perl. If you try and run git http backend. In order to fix this, copy libiconv. C Program Files x. Gitbin to C Program Files x. Gitlibexecgit core. Now when you run git http backend. Installing OCI8 as a Shared Extension. The configuration shared option builds OCI8 as a shared library that can be dynamically loaded into PHP. HTTP 5. 00 server error Step 2 Install Apache. Next youll need to install the Apache webserver. Im using the 2. 2. Install-and-Configure-Php-5.2.5-and-Apache-2.2.8-in-Windows-Vista-Step-2Bullet9.jpg' alt='Installing Php5 On Apache 2.2' title='Installing Php5 On Apache 2.2' />I ran through the installation using the default options so my Apache instance is running on port 8. If you visit http localhost at this point you should be greeted with Apaches standard It works message. Step 3 Create Repositories Directory. Iso 14229-1 Unified Diagnostic Services Uds. Create the directory where you want to store your git repositores. Im using C Repositories. For testing purposes I created an empty test repository Youll also need to put some content in this test repositor Step 4 Modify Apache Configuration. Next, youll need to modify the Apache configuration file so that it forwards requests to git http backend. This is done by editing httpd. C Program Files x. Apache Software Foundation. Apache. 2. 2conf. Genesis 3D Developer Kit For Android. At the bottom of httpd. Set. Env GITPROJECTROOT C Repositories. Set. Env GITHTTPEXPORTALL. Script. Alias. Match. HEAD. inforefs. Installing Php5 On Apache 2.2C Program Files x. The first line tells git where your repositories are located. The second line tells git that all repositories in this directory should be published over http by default, git will only publish those repositories that contain a file named git daemon export ok. The final lines tell apache to route git specific URLs to the git http server. Finally, if you want to be able to clone from the server without authentication, then youll need to tell Apache to allow anonymous access by adding the following lines into httpd. Directory. Allow from all. Directory After saving the changes, restart the Apache service. Step 5 Clone the test repository. Next, clone the test repository that you crated in step 3 by issuing the command git clone http localhostTest. If all goes well, you should see the following output At this point, you can now clone repositories from the server without any authentication. Step 6 Authentication. If you try to push changes to the repository you cloned in step 5, youll receive an error This is because by default, you can only pull from repositories anonymously, while pushing requires authentication to be enabled. Scenario 1 Allow anonymous pushes. Sometimes you may want to allow users to push to your repositories without authentication, for example when using an internal, privately hosted server. To enable this scenario, edit the config file in C Repositories. Test. git on the server and add the following lines to the bottom of the file http. This will allow git to accept pushes from anonymous users. Note that youll have to add this to every repository that you create. Ill show a nicer way to do this later in the tutorial. Scenario 2 Anonymous pull, authenticated push. This is the default scenario. Git will only allow users to push if they have been authenticated with apache. There are several ways to enable user accounts with apache. The most basic is to use. Windows user accounts and Active Directory by using modauthnzldap. Configuring these is outside the scope for this tutorial, but there are plenty of examples on the internets. Once authentication is set up, youll need to ensure that you clone your repositories with the username in the URL, as git will not prompt you for a username by default git clone http My. User. NamemygitserverTest. Git will then prompt you for a password every time that you try to push. You can also hard code the password in the URL somewhat insecure if you want to avoid this prompt git clone http My. User. Name PasswordmygitserverTest. To make this more secure, you could enable SSL on the server and require authenticated traffic to go over HTTPS. Although configuring Open. SSL with apache is outside the scope for this tutorial, I will point out that once configured, you will need to disable the SSL verification on your git client by running git config global http. If you dont do this, youll get an error saying error setting certificate verify locations every time you try to clonepushpull over HTTPS. Step 7 A prettier UIAt this point, you should be able to clone, pull from and push to the server. However, creating new repositories requires that you connect remotely to the server and run git init from a command prompt on the server. A nicer alternative is to use a web based front for the creation of repositories. For this Ill be using Git. Php. Homepage which is a small collection of PHP scripts that I ported from Git. Aspxs ASP. NET based UI to PHP in order to get it working under Apache. First, youll need to install PHP on the server. Ill be using the PHP 5. Windows binaries that can be found at http windows. The download page is somewhat confusing, offering both thread safe and non thread safe versions compiled with both VC6 and VC9. For use with Apache 2. VC6 x. 86 Thread Safe zip package. Heres a direct link. Unzip the contents of this package to C PHP on the server and add this directory to Windows PATH environment variable Next, rename the php. Uncomment and edit the extensiondir about half way through the file so that it says the following extensiondir c phpextNext, edit your Apache configuration file C Program Files x. Apache Software Foundation. Apache. 2. 2confhttpd. Add. Type applicationx httpd php. Load. Module php. C phpphp. 5apache. PHPIni. Dir C phpThis tells Apache to map. PHP5 apache module located in C php. Youll also need to tell Apache to look for index. This can be done by searching for the lines that look like this lt If. Module dirmodule. Directory. Index index. If. Module and changing them to this lt If. Module dirmodule. Directory. Index index. If. Module Be sure to restart the Apache server once youve made these changes. To see whether this is working, create a file called phpinfo. C Program Files x. Apache Software Foundation. Apache. 2. 2htdocs and place in it the following content lt Now, visiting http mygitserverphpinfo. PHP configuration information. Now that PHP is configured, download the Git. Php. Homepage files from http github. Jeremy. SkinnerGit. Php. Homepage and unzip them into C Program Files x. Best Computer Screen Magnifier Software more. Apache Software Foundation. Apache. 2. 2htdocs Be sure to edit the config.