php - Running 2 projects on apache server -
i have 2 projects in htdocs folder: project1 , project2. running project1 on mamp server. it's located on localhost:8888 (default location provided mamp). want run second project2. changes need make happen?
i added httpd.conf file this, it's not working. there elegant way this?
<virtualhost *:8888> servername zf2-tutorial.localhost documentroot /applications/mamp/htdocs/zf2-tutorial-1/public setenv application_env "development" <directory /applications/mamp/htdocs/zf2-tutorial-1/public> directoryindex index.php allowoverride order allow,deny allow </directory> </virtualhost> <virtualhost *:8888/secondproject> servername zf2-tutorial2.localhost documentroot /applications/mamp/htdocs/zf2-tutorial-2/public setenv application_env "development" <directory /applications/mamp/htdocs/zf2-tutorial-2/public> directoryindex index.php allowoverride order allow,deny allow </directory> </virtualhost> am doing wrong?
seems good, except <virtualhost *:8888/secondproject> supposed <virtualhost *:8888>. also, don't forget add lines binding zf2-tutorial.localhost , zf2-tutorial2.localhost 127.0.0.1 /etc/hosts file , restart apache.
Comments
Post a Comment