Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

What is wrong with my Symfony Configuration?

Towards the end of the first tutorial (http://symfony.com/legacy/doc/jobeet/1_4/en/01?orm=Doctrine), I’m asked to change the configuration of my server so it’s looking in my “bruce” folder (home/ sfprojects/jobeet/web/index.php). Here’s what I did:

# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080

# This is the configuration for your project
Listen 127.0.0.1:8080

<VirtualHost 127.0.0.1:8080>
  DocumentRoot "/home/sfprojects/jobeet/web"
  DirectoryIndex index.php
  <Directory "/home/sfprojects/jobeet/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  <Directory "/home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

I’m changing the port and the root directories. Simple enough. Thing is, ” home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf” doesn’t exist. That may not make a difference, but when I went to see the page that’s supposedly at http://~localhost~:8080/, I get a “page not found” error. What am I doing wrong?
Avatar of duncanb7
duncanb7

Did you try the port besides 8080 such as 9090 ?
Did you stop and start apache again ?
Did you find the index.php at that directory on shell command, for example, ls /home/sfprojects/jobeet/web/index.php  ?

Duncan
Avatar of Bruce Gust

ASKER

Duncan! I'm glad you're up, my friend!

When I go the shell command route, first off, I'm using this: ls home/sfprojects/jobeedt/web/index.php. I'm omitting the first "/" and I wanted you to see that, being that I'm not sure that's a deal breaker or not.

The screen print I have attached shows you, both the outcome of the command (which was successful), as well as the way I have things set up as seen in my Finder.

I have re-started Apache. I have not tried any other ports other than the ones specified in the tutorial I'm attempting to make my way through (http://symfony.com/legacy/doc/jobeet/1_4/en/01?orm=Doctrine).

What do you think?
Please answer my question ?

Try other port such as 9090 instead of 8080  since your system might be using 8080
for other application and check whether the file of index.php
is at that directory first or not

Duncan
OK, I changed the port to 9090 and when I open up MAMP after restarting it, I get this URL: http://localhost:9090/MAMP/?language=English and I get the MAMP start page.

If I try this: http://localhost:9090/home/sfprojects/jobeet/web, I get a page not found.

Things is, that doesn't surprise me because I'm assuming that MAMP is not looking for a file outside the MAMP application itself, correct? So if I don't have a "home" directory in my MAMP application, should I expect it to open up a page that's sitting in my user/bruce directory?
ASKER CERTIFIED SOLUTION
Avatar of duncanb7
duncanb7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm just going by the tutorial at http://symfony.com/legacy/doc/jobeet/1_4/en/01?orm=Doctrine

Regardless of which service I use, shouldn't my Symfony project be located within my MAMP application? How can a php page work unless it's hosted within the app? It boggles my mind to think that I'm pointing my web server to a page that's in my user folder as opposed to a file that's "hosted" with my web server.