In xampp,

all anyone has to do is to place a folder inside htdocs and http://localhost/folder_name will automatically work.

If i set up a LAMP stack using sudo tasksel in ubuntu,

how do i do it such that if i put a folder inside /var/www the same thing would happen as in localhost/folder_name would work?

update

sorry all, i have chosen to do things in a different way hence this question is no longer relevant to me.

I apologise.

I have awarded upticks to all answers here.

Thanks for the suggestion.

link|improve this question

25% accept rate
That should work out of the box. What is happening for you? What is not working? – Znarkus Nov 21 '10 at 12:57
i am moving to ubuntu for my development machines and somehow it does not work for cakephp in ubuntu-LAMP stack. if i use xampp, then i can do a localhost/folder_name easily. i can use this instruction bakery.cakephp.org/articles/lukemack/2007/04/10/… but that means i cannot use localhost/folder_name. Please advise. – kimsia Nov 21 '10 at 13:13
Define "does not work". Also don't forget to check your error log. – joschi Nov 21 '10 at 13:15
error log nothing except for messages stating that i restarted my apache. my cakeapp does not display and it will display ONLY when i deliberately set my document root to the project folder's subfolder. which is definitely something i did not do when i was using xampp. – kimsia Nov 21 '10 at 13:28
i also enabled mod_rewrite and definitely set AllowOverride All to allow .htaccess – kimsia Nov 21 '10 at 13:28
feedback

2 Answers

Can you try visiting http://localhost/foldername/app/webroot/index.php ?

If that works, that means .htaccess files are not working. A common problem that I've run into, especially modifying the wrong AllowOverride.

link|improve this answer
feedback

The default Apache install on Ubuntu is setup with one vhost, that is mapped to /var/www. If Apache is running, you should be able to type http://localhost into a browser and see the directory listing for /var/www.

Try to create a simple file

<?php
phpinfo();

, save it to /var/www/test.php and then access it on http://localhost/test.php.

Are you going to develop multiple projects? Then I'd recommend adding additional vhosts per project. So instead of modifying default vhost, make a copy of it. Don't forget to activate it with a2ensite [vhost-name].

If you're still having problems, please post your vhost, some basic info on your directory structure etc.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.