I have a running XAMPP(lampp) in the /opt/lampp/htdocs/xampp directory.

I have downloaded xampp 1.8.2-4 from here

I start xampp by sudo /opt/lampp/lampp start/stop so whenever I hit localhost it redirects me to localhost/xampp

Now the problem is when I hit localhost/xampp its showing

Not Found
The requested URL /xampp/ was not found on this server.
Apache/2.4.6 (Ubuntu) Server at localhost Port 80

the problem is my localhost is now pointing to /var/www/index.html not to /opt directory

Apache is starting when I type in the terminal:

$ service apache2 start
* Starting web server apache2

Now, after stopping XAMPP by

sudo /opt/lampp/lampp stop

when i hit localhost its fetching index.html from var/www directory with a message

It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.

How can I make my XAMPP responds with

sudo /opt/lampp/lampp start

How it can be resolved?

  • 2
    As mentioned in the tag excerpt XAMPP is NOT packaged in Ubuntu! Installing LAMP, which consists of the same components, is recommended instead and as easy as installing XAMPP – Dan Mar 20 '14 at 8:21

You must change DocumentRoot in VirtualHost

File is /opt/lampp/etc/extra/httpd-vhosts.conf:

<VirtualHost *:80>
    ServerAdmin web@your_site.com
    DocumentRoot "/opt/lampp/htdocs/your_site"
    ServerName your_site.com
    ErrorLog "logs/your_site.com-error_log"
    CustomLog "logs/your_site.com-access_log" common
| improve this answer | |
  • httpd-vhost.conf got two <virtualhost> segment.can u plz elaborate where to change to responds with localhost/xampp – black Mar 20 '14 at 8:05
  • Edit one segment or you can add new sector <virtualhost> with your data – 2707974 Mar 20 '14 at 8:09

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.