This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » http.conf for the sample cart AJAX application
http.conf for the sample cart AJAX application [message #252] Wed, 09 November 2005 21:16 Go to next message
liliwu  is currently offline liliwu
Messages: 5
Registered: November 2005
Junior Member
Hello,

I'm very new to symfony and I'm using Apache on Windows platform. I downloaded the cart source code from the tutorial, but I have difficulty with the http.conf. I want to access the cart as http://localhost/sfdemo/cart, with alias and not virtual host (just like the online demo at http://www.symfony-project.com/demo/cart). From the downloaded source code, I see that the sfdemo/web/.htaccess is NOT modified, as oppose to what the "How to configure a web server" says. Can someone tell me what I need to do in http.conf so that I can access the sample as http://localhost/sfdemo/cart?

Also, is it possible that I don't modify http.conf and just access it through its direct file name, something like http://localhost/sfdemo/app/module/cart/index.php or something similar? I need to use the symfony internally in my project, and prefer to invoke it as a straight filename.

Thanks!

Lili
Re: http.conf for the sample cart AJAX application [message #253 is a reply to message #252 ] Wed, 09 November 2005 22:32 Go to previous messageGo to next message
Ian  is currently offline Ian
Messages: 383
Registered: October 2005
Location: Boulder, CO (USA)
Faithful Member
You could do something like this:

Alias /sfTest/ "/var/www/sfTest/web/"

<Directory "/var/www/sfTest/web">
    DirectoryIndex index.php
    AllowOverride All
</Directory>


Make sure you upgrade to the latest beta before you do, alias support is not in 0.4.x.

To access the files directly, you'll have to use a URL like this:

http://domain.com/index.php/module/action/


[Updated on: Wed, 09 November 2005 22:34]


Ian

Join us on IRC for LIVE support!
Report bugs here.
Re: http.conf for the sample cart AJAX application [message #255 is a reply to message #252 ] Wed, 09 November 2005 22:56 Go to previous messageGo to next message
liliwu  is currently offline liliwu
Messages: 5
Registered: November 2005
Junior Member
Thanks a lot for the reply. However, I now get this 404 error page when I do http://localhost/mydemo/

Quote:


Oops! We couldn't find this page for you.
Did you type the URL?
You may have typed the address (URL) incorrectly. Check it to make sure you've got the exact right spelling, capitalization, etc.

Did you follow a link from somewhere else at this site?
If you reached this page from another part of this site, please email us at [email] so we can correct our mistake.

Did you follow a link from another site?
Links from other sites can sometimes be outdated or misspelled. Email us at [email] where you came from and we can try to contact the other site in order to fix the problem.



Go back a page
Visit the home page



404 Error : page not found



In my httpd.conf, I have:
Quote:


Alias /mydemo/ "C:/Program Files/Apache Group/Apache2/htdocs/sfdemo/web/"

<Directory "C:/Program Files/Apache Group/Apache2/htdocs/sfdemo/web">
DirectoryIndex index.php
AllowOverride All
</Directory>

Alias /sf "C:/Apps/php-5.0.5/PEAR/data/symfony/web/sf"



I also enabled rewrite module
LoadModule rewrite_module modules/mod_rewrite.so

Thank you very much!

Liil

[Updated on: Wed, 09 November 2005 22:59]

Re: http.conf for the sample cart AJAX application [message #263 is a reply to message #255 ] Wed, 09 November 2005 23:32 Go to previous messageGo to next message
Ian  is currently offline Ian
Messages: 383
Registered: October 2005
Location: Boulder, CO (USA)
Faithful Member
liliwu wrote on Wed, 09 November 2005 16:56

Thanks a lot for the reply. However, I now get this 404 error page when I do http://localhost/mydemo/

Quote:


Oops! We couldn't find this page for you.
Did you type the URL?
You may have typed the address (URL) incorrectly. Check it to make sure you've got the exact right spelling, capitalization, etc.

Did you follow a link from somewhere else at this site?
If you reached this page from another part of this site, please email us at [email] so we can correct our mistake.

Did you follow a link from another site?
Links from other sites can sometimes be outdated or misspelled. Email us at [email] where you came from and we can try to contact the other site in order to fix the problem.



Go back a page
Visit the home page



404 Error : page not found



In my httpd.conf, I have:
Quote:


Alias /mydemo/ "C:/Program Files/Apache Group/Apache2/htdocs/sfdemo/web/"

<Directory "C:/Program Files/Apache Group/Apache2/htdocs/sfdemo/web">
DirectoryIndex index.php
AllowOverride All
</Directory>

Alias /sf "C:/Apps/php-5.0.5/PEAR/data/symfony/web/sf"



I also enabled rewrite module
LoadModule rewrite_module modules/mod_rewrite.so

Thank you very much!

Liil




I'm not sure that it will find the path with spaces in it. I'll see if I can find out and get back to you.

Edit: Also, make sure you're running the latest beta version of symfony.

[Updated on: Wed, 09 November 2005 23:37]


Ian

Join us on IRC for LIVE support!
Report bugs here.
Re: http.conf for the sample cart AJAX application [message #265 is a reply to message #263 ] Wed, 09 November 2005 23:42 Go to previous messageGo to next message
liliwu  is currently offline liliwu
Messages: 5
Registered: November 2005
Junior Member
Yes, I did get the latest symfony with this command:
pear upgrade symfony/symfony-beta

thank you!!!
Re: http.conf for the sample cart AJAX application [message #430 is a reply to message #265 ] Thu, 17 November 2005 02:18 Go to previous messageGo to next message
shevek  is currently offline shevek
Messages: 3
Registered: November 2005
Junior Member
My httpd.conf looks like this:
Quote:


LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Alias /sfdemo/ "/var/www/sfdemo/web"
<Directory "/var/www/sfdemo/web">
DirectoryIndex index.php
AllowOverride All
</Directory>

Alias /sf "/var/www/symfony-0.4.1/data/symfony/web"




And when I try to access the example in http://localhost/sfdemo/, I get a 404 Not Found. What am I doing wrong?
Re: http.conf for the sample cart AJAX application [message #433 is a reply to message #430 ] Thu, 17 November 2005 07:13 Go to previous message
liliwu  is currently offline liliwu
Messages: 5
Registered: November 2005
Junior Member
You probably should have the / at teh end of "web" for the Alias, so it looks like:
Alias /sfdemo/ "/var/www/sfdemo/web/"

Just my guess, because I still haven't been able to get mine working (I'm working on Windows platform with Apache). So for now, I'm just accessing mine with localhost/sfdemo/web/index.php/cart.

Lili
Previous Topic:How to extend sfContext?
Next Topic:databse table named "list"?
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software