Skip to content

Instantly share code, notes, and snippets.

@Guley
Created August 20, 2018 05:23
Show Gist options
  • Save Guley/725f6e6661839caec7a3e3b015f883e8 to your computer and use it in GitHub Desktop.
Save Guley/725f6e6661839caec7a3e3b015f883e8 to your computer and use it in GitHub Desktop.
Bypass htdocs folder to your own directory in linux
Run this command to stop xampp:
sudo /opt/lampp/lampp stop
Open /opt/lampp/etc/httpd.conf
Change your_folder to the folder you wanna use
DocumentRoot "/home/username/your_folder"
<Directory "/home/username/your_folder">
Change User & Group value from daemon to:
User nobody
Group nogroup
set chmod to your_folder with this command
sudo chmod 777 /home/username/your_folder
Save the file and start xampp with this command:
sudo /opt/lampp/lampp start
Open your browser and enter this url:
http://localhost/your_folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment