24

I finished installing Ubuntu 10 for netbooks, and XAMPP. The XAMPP website tutorial made it very easy to install, then left me high and dry. Everything works, but I have no idea where to put my handwritten php files.

After a few hours of googling, and trying to understand the file explorer, I realized I have no idea where anything is in ubuntu. For an answer, please don't just tell me "go to "X" directory. I won't know how to navigate there.

I also did a file search for htdocs with no luck.

6 Answers 6

43

in XAMPP the default root is "htdocs" inside the XAMPP folder, if you followed the instructions on the xampp homepage it would be "/opt/lampp/htdocs"

0
18

I created my project folder 'phpproj' in

...\xampp\htdocs

ex:...\xampp\htdocs\phpproj

and it worked for me. I am using Win 7 & and using xampp-win32-1.8.1

I added a php file with the following code

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

was able to access the file using the following URL

http://localhost/phpproj/copy.php

Make sure you restart your Apache server using the control panel before accessing it using the above URL

2

When in a window, go to GO ---> ENTER LOCATION... And then copy paste this: /opt/lampp/htdocs

Now you are at the htdocs folder. Then you can add your files there, or in a new folder inside this one (for example "myproyects" folder and inside it your files... and then from a navigator you access it by writting: localhost/myproyects/nameofthefile.php

What I did to find it easily everytime, was right click on "myproyects" folder and "Make link..."... then I moved this link I created to the Desktop and then I didn't have to go anymore to the htdocs, but just enter the folder I created in my Desktop.

Hope it helps!!

0
1

Look into the httpd.conf and/or httpd-vhosts.conf files and search for the DocumentRoot entry. If you configure multiple virtual hosts, there may be more than one of those, separated in <VirtualHost> tags.

7
  • I don't know what the httpd.conf or httpd-vhosts.conf files are and I don't know where they are. Typing them into my browser bar didn't work. I don't know where files and folders are in ubuntu and this is the kind of help i need. For an answer, please don't tell me to "look at file x." I need help navigating to the correct file. Jun 11, 2010 at 10:40
  • /path_to_your_apache_install/conf/httpd.conf a file search will turn them up.
    – Pekka
    Jun 11, 2010 at 10:41
  • If there is any such Apache install folder it is hidden from me. I have no idea how to find it. Jun 11, 2010 at 10:56
  • CDeanMartin try locate httpd.conf or if that is not available, find / -name "httpd.conf" (the latter will throw a lot of "access denied"s, that's okay)
    – Pekka
    Jun 11, 2010 at 10:57
  • But this is starting to belong on superuser.com :) voting to migrate there.
    – Pekka
    Jun 11, 2010 at 11:01
-1

This will work for me:

.../xampp/htdocs/php/test.phtml
1
  • But, make sure you have to add respected files to this location: go to xampp folder, open htdocs and then create a new folder called php. otherwise, it won't recognize the system.
    – YKB
    Apr 26, 2018 at 8:53
-2

The default location to put all the web projects in ubuntu with LAMPP is :

 /var/www/

You may make symbolic link to public_html directory from this directory.Refered. Hope this is helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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