Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I install xampp in my Ubuntu 12.10. After installation I deleted index.php inside /opt/lampp/htdocs then I

sudo chmod 777 -R /opt/lampp/htdocs

to create a folder and place my htmls after I placed my files I

sudo chmod 775 -R /opt/lampp/htdocs 

it was running initially when I typed

localhost 

the files within htdocs appeared but when I opened it again (after shutting down my laptop) it was gone. All I can see is

Index of/
Name Lastmodified Size Description
Apache/2.2.22 (Ubuntu) Server at localhost Port80

Please help.

share|improve this question
    
Could you tell how you installed LAMP as /opt/lampp/htdocs is not the default directory for html files in Apache? Did you follow a specific tutorial? –  papukaija Jul 9 '13 at 19:25
    
through the ubuntu software center. our instructor told us in class to place our html files there in htdocs. anyway I have already came up with a solution to the problem. Have been quite busy to post it here, lately. Perhaps in another week, I will. –  Ralf17 Jul 9 '13 at 19:31

1 Answer 1

up vote 0 down vote accepted

Most probably you already had an apache installed via the Ubuntu packet management when you installed xampp. You should decide if you really want to use xampp or just use the applications that come with Ubuntu (I personally prefer the latter).

If you want to keep xampp: remove apache2 with sudo apt-get remove apache2 (or with synaptics if you prefer a gui). After that you should be able to start your apache from the xampp installation again.

If you want to use the apps shipped with Ubuntu: the default document root of the apache is in /var/www, the configuration files reside in /etc/apache2. The Ubuntu wiki has loads of information about the configuration and usage.

If you already had apache installed it is possible that you run into similar problems with other services, for example MySQL.

share|improve this answer
    
I edited my question. Removed apache2. then install xampp again. but after I restart the computer Xampp says there's another daemon running. –  Ralf17 Jun 15 '13 at 2:07
    
Hey I tried this thread askubuntu.com/questions/89156/… and everything is now fine when I start xampp but still my localhost contents are not there in the browser. Have edited again my question. –  Ralf17 Jun 15 '13 at 3:14
    
You can do the following to find out which apache is actually running right now: run sudo netstat -nlp |grep :80 in a terminal to get the process id of the running apache, in my case it's 1722/apache2 (last part of the output). Now you can use that id to see it's full path to the binary: sudo ps -Af |grep 1722. Maybe this sheds some light. –  Gerald Schneider Jun 15 '13 at 10:15
    
I have already solve my problem. It consists of three steps. I'll post it here later. –  Ralf17 Jun 21 '13 at 7:55
    
I followed the instructions under this thread askubuntu.com/questions/89156/… then added 2145 to localhost in my browser (i.e. in the address bar typed localhost:2145) and there I could now see the contents of localhost. thanks for the help anyways :) –  Ralf17 Jul 30 '13 at 12:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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