Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Cannot get tutorial to work

Second time trying to post this.

When reaching the end of the first section of the tutorial my browser shows a directory listing instead of the "Hello!" message using the following URL - "http://localhost/tutorial".

If I add the public folder to it, i.e. "http://localhost/tutorial/public", it works correctly.

I created and placed both .htaccess files in their respective folders.

I followed the same folder convention as shown on the page, "tutorial" as the 'root' folder with "app" and "public" contained therein.

phpInfo shows Phalcon enabled as version 1.3.2.

I believe I have followed the instructions word for word and so I am disappointed that it isn't working.

Questions:

1) What does the "test" refer to in the URL "http://localhost/test" as shown in the graphic saying "Hello!"?

2) What is the root folder in Apache's httpd.conf set to in relation to the tutorial folder as shown in the suggested file structure?

Any other thoughts on what might be causing this behavior?



29.9k
Accepted
answer

Hi,

When reaching the end of the first section of the tutorial my browser shows a directory listing instead of the "Hello!" message using the following URL - "http://localhost/tutorial".

this looks like you haven't mod_rewrite enabled (and your .htacces file is ignored). Solution is to type command: a2enmod rewrite (as root)

1) What does the "test" refer to in the URL "http://localhost/test" as shown in the graphic saying "Hello!"?

it's an error, it should be (on the picture): "http://localhost/tutorial".

2) What is the root folder in Apache's httpd.conf set to in relation to the tutorial folder as shown in the suggested file structure?

looks like default apache config: usualy /var/www (under linux) => http://localhost /var/www/tutorial => http://localhost/tutorial

By going to github I saw that Apache's mod-rewrite module must be loaded and turned on. It would be helpful to show that on the "Installation on WAMP" page.

Thanks. The first time I wrote it I mentioned I was using WAMP but left it out on the rewrite (for some reason when I clicked submit it went to the discussions page and said I needed to log in again.

Yes, the mod-rewrite wasn't enabled however I had to edit the httpd.conf file to load the module and to turn it on.