when i run command sudo /opt/lampp/lampp start

Starting XAMPP for Linux 7.1.11-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

My file location is /var/www/example/test.php

  • I think the default page should be accessible via http://localhost
    – pa4080
    Nov 18, 2017 at 11:47
  • Don't understand your comment Nov 18, 2017 at 12:12
  • It means type http://localhost into the browser and you should see the default home page! Nov 18, 2017 at 12:14
  • when i type localhost then shows localhost/dashboard page Nov 18, 2017 at 12:17
  • 1
    Yes your answer is good Nov 19, 2017 at 0:18

1 Answer 1


In short, to access http://localhost/xampp within the default configuration of XAMPP you must:

  • Create a sub dir called xampp/ into the DocumentRoot directory. The default DocumentRoot of XAMPP is /opt/lampp/htdocs/ - source:

    sudo mkdir /opt/lampp/htdocs/xampp
  • Create a simple index.html or index.php file:

    echo '<?php phpinfo(); ?>' | sudo tee /opt/lampp/htdocs/xampp/index.php

    The above command will create index.php file in the directory /opt/lampp/htdocs/xampp/, that will contain the code: <?php phpinfo(); ?>.

If that works and you are able to see a page as this shown here, you must read the documentation of XAMPP and some relevant articles to gain a basic knowledge: How to setup a Virtual Host locally with XAMPP in Ubuntu.

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.