- First I am going to assume you’re using a Windows machine and have XAMPP installed.
- Open the XAMPP control panel application and stop Apache. Be aware that late Windows machines might run it as a service, so check the box to the left of the Apache module.
- Navigate to C:/xampp/apache/conf/extra or wherever your XAMPP files are located.
- Open the file named httpd-vhosts.conf with a text editor.
- Around line 19 find # NameVirtualHost *:80 and uncomment or remove the hash.
- At the very bottom of the file paste the following code:
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs" ServerName localhost </VirtualHost>
- Then after that you can copy this code:
<VirtualHost *:80> ServerName zf2-tutorial.localhost DocumentRoot "C:/xampp/htdocs/zf2-tutorial/public" SetEnv APPLICATION_ENV "development" <Directory "C:/xampp/htdocs/zf2-tutorial/public"> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Wednesday, March 13, 2013
Setting up Virtual Hosts with XAMPP running on Windows 7
The Steps
Subscribe to:
Comments (Atom)