I am a php developer. I've been developing projects on a Windows system. Now I have completely switched to Ubuntu. I've installed XAMPP on my Ubuntu 16.04. I am not able to save my web files on htdocs as I used to save them in Windows before. My current default directory is opt/lampp/htdocs/
. Is there a different way to handle the projects on a Linux system?
Asked
Active
Viewed 4,825 times
1

Zanna
- 70,465
1 Answers
2
Follow these steps to get your projects setup:
Create a users group called
xamppusers
:sudo groupadd xamppusers
Add yourself to that group:
sudo usermod -a -G xamppusers $USER
Change the ownership of the
/opt/lampp/htdocs
folder:sudo usermod -R root.xamppusers /opt/lampp/htdocs sudo chmod -R 775 /opt/lampp/htdocs
Restart the system
Restart
xampp
:sudo /opt/lampp/lampp start
To set up sample webpage:
Create a document in
htdocs
:nano /opt/lampp/htdocs/info.php
Add this content to it:
<?php echo phpinfo(); ?>
Now in browser go to
localhost/info.php
, and you should see the output of that file.
With that if you have a projects you want to create that would in your case come with a folder
the place that folder in htdocs
like you use to on Windows
and your good to go. From the xampp dashboard
go to http://localhost/dashboard/howto.html
for more information on running applications.

George Udosen
- 36,677
sudo chmod +777 -R /opt/lampp/htdocs/" in a terminal and you will be good to go. :) – Tharushi Geethma Aug 17 '18 at 10:12