Page 29 About URL

Home Forums Learn ZF2 Page 29 About URL

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  Slavey Karadzhov 1 year, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #792

    I was really determined to learn zf2 but am stuck.

    I see the index page when i type “learnzf2” or “localhost” into my url
    What am I supposed to type into my browser to see the about page they are talking about on page 29?

    The book said “The complete URL should be something like http://localhost/application/index/about.”

    **insert 2 weekends of attempting logical derivatives of this url and *****

    I get “Not Found The requested URL /application/index/about was not found on this server. Apache/2.4.9 (Win64) PHP/5.5.12 Server at learnzf2 Port 80”

    My file path (I did git checkout ‘ch-first-controller’ so it’s clean)=
    C://Projects/learnzf2/module/Application/view/application/index/about.phtml

    my wampserver is running green

    —various other possibly pertinent information——————–
    c:/wamp/bin/apache/Apache2.2.21/conf/extra/httpd.vhosts.conf=

    <Directory c:/Projects/learnzf2>
    Require all granted
    </Directory>

    <VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot “c:/Projects/learnzf2/public”
    ServerName learnzf2.localhost
    ServerAlias learnzf2.localhost
    ErrorLog “logs/dummy-host.example.com-error.log”
    CustomLog “logs/dummy-host.example.com-access.log” common
    </VirtualHost>
    ———————————————

    c:/wamp/bin/achache2.2.1/conf/httpd.conf –
    removed # from Virtulhosts Include conf/.extra/httpd-vhosts.conf
    ————————————
    c:/windows/system32/drivers/ect/hosts =
    127.0.0.1 learnzf2
    ———————————————-

    If anyone could help me I would really, Really, REALLY Appreciate it!!
    What exact characters should I type into my browser window to see the about page?

    #795

    PAGE 23, sorry

    #796

    Slavey Karadzhov
    Participant

    HI Jacacia, What I see from your information is that you have Vhost for learnzf2.localhost. It means that you should open the following file as Admin user C://Windows//System32//Drivers//etc//hosts and in it append the following line:

    127.0.0.1 learnzf2.localhost

    And save the file. Once you are ready you should be able to type in your preferred browser the following URL:
    http://learnzf2.localhost

    and if the things are set as described in the book you should be able to see your first Zend Framework application.

    Give it a try and tell me if it works for you.

    • This reply was modified 1 year, 10 months ago by  admin.
    • This reply was modified 1 year, 10 months ago by  admin.
    #804

    Thank you so much for your prompt response. I really appreciate it!!

    I could always see the homepage but have made the change you advised and now can see the homepage again at http://learnzf2.localhost

    I am on page 23 of the book trying to see the about page

    the about.phtml page that I want to see is in the same folder as the index.phtml page that shows up so readily at Site/module/Application/view/application/index/about.phtml

    if I put into my url http://learnzf2.localhost/application/index/about

    it gives me a 404 error The requested URL /application/index/about was not found on this server.

    learnzf2.localhost/module/Application/view/application/index/about.phtml
    gives me a 404 error too.

    Is that enough information for you to help me know the url of the about page?

    #805

    Slavey Karadzhov
    Participant

    > if I put into my url http://learnzf2.localhost/application/index/about it gives me a 404 error The requested URL /application/index/about was not found on this server.

    Are you getting a white page with a bit of text saying this error message, or a page, that has menus on the top and in the middle has that error message?

    If you have the first case then most probably your apache server is not configured correctly and the .htaccess file is being ignored. Go to this directory: c:/wamp/bin/apache/Apache2.2.21/conf/ and open the httpd.conf file. There should be a directive saying

    AllowOverride None

    Change it to

    AllowOverride All

    Save the changes and restart apache.

    If you have the second case then make sure that the apache rewrite module is enabled. Check if at least this is working for you: http://learnzf2.local/index.php/application/index/about

    And finally if you think that these configurations are too complicated for you then you can create your own VirtualBox (See: http://learnzf2.com/isolated-development-environment-for-learn-zf2/) image and in it all configurations will be done automatically for you.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.