By default, I can access to my localhost in http://localhost:8080/(my port sets to 8080) and the projects are deployed under htdocs folder.
But, how to change that? I read some posts online and find a way to do it for XAMPP.
Firstly, copy the following lines to C:\xampp\apache\conf\extra\httpd-vhosts:
<VirtualHost *:8080> DocumentRoot "C:/xampp/htdocs/zend/public" ServerName zend SetEnv APPLICATION_ENV development <Directory "C:/xampp/htdocs/zend/public"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
The port number is 8080. And the root directory is : “C:/xampp/htdocs/zend/public, which is my zend framework project application folder.
But before open the browser, there is still one more thing to do:
Go to ‘C:\Windows\System32\drivers\etc’, and find open ‘hosts’.
Here, I edit another host by using the following contents:
127.0.0.1 localhost zend
After this configuration, don’t forget to restart the apache server.
Then it is the time to open the browser to try the new url: http://zend:8080
and it will access the public/ directory.