Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlexandra Sophie Coyle
1,616 PointsCanβt view index.php from any other folder only htdocs
Hi I have tried changing the folder from htdocs to a new folder called sites in my documents folder - I followed the steps in the video but I canβt get it to work - I turned off I cloud - once I change the root back to mamp/htdocs/ The index.php is viewable on local host my sites - any suggestions what am I missing?
4 Answers
jonathanbarrios
Treehouse TeacherIf you followed the video steps at 5:40 where you change the document root to another directory, it should work. I verified that it works so make sure you followed those steps. There are other configuration settings that could be causing a problem so make sure another instance of apache isn't running in the background. Try restarting your machine and if you're still having problems, try searching for similar issues from other users using Google, or any other search engine.
Alexandra Sophie Coyle
1,616 PointsHI I finally got it to work - I had set the ports to 80 3306 like it says in the video - I reset the ports to 8888 and it now works I can view my index.php page my local host path is user/documents/sites/testsite1/index.php - have decided to learn more about ports - really happy thanks Johnathan
jonathanbarrios
Treehouse TeacherWay to go Alexandra Sophie Coyle π
Setting the ports to 80 3306 like it says in the video is so you can use localhost without port numbers. Glad you powered through and found a solution that works. I personally like using port numbers because I can simply use 8000 for PHP and 8001 for Laravel, etc...
Happy coding! π
Marston Gould
PHP Development Techdegree Student 17,314 PointsI had exactly the same situation. When I change my ports to anything other than the MAMP ports, it doesn't work.
Alvin Galit
3,822 PointsSame issue and only worked by switching back the port as well.
jonathanbarrios
Treehouse TeacherHi ππΌ Marston Gould,
Did you get it sorted out?
Marston Gould
PHP Development Techdegree Student 17,314 PointsYes, but in the exact same way that Alexandra did. I'm not able to switch both the ports AND the location