Subscribe:

Ads 468x60px

Showing posts with label splash.php. Show all posts
Showing posts with label splash.php. Show all posts

Saturday, August 4, 2012

Symbolic Link for htdocs in Linux XAMPP


Creating Symbolic Link for htdocs in Linux XAMPP

As we know, the http://localhost in the web browser maps to the content of htdocs directory of /opt/lampp/htdocs and this htdocs directory doesn't have read/write permission(only limited to root). Many people(I also) tried to change the permission by invoking in terminal as root:
chmod -R 755 /opt/lampp/
but it creates issues:
 you will be stuck at splash.php (the language selection screen) when navigating to localhost!
and also it's troublesome to keep changing permissions in /opt/lampp/htdocs directory for various .html and .php files for testing. 
So, how to get rid of this ???
One popular solution is, to create symbolic link of htdocs to another directory at desirable place and change it's permission.
Essentially this means that your projects will technically exist in this new folder which will reside in your Home folder, but XAMPP will treat it as if it were located within htdocs.

Step 1.) Make a directory at any desirable location.
mkdir ~/test
Step 2.)Create symbolic/soft link
sudo ln -s ~/test /opt/lampp/htdocs



Enter root's password (if root password is not set, then set it using command "sudo passwd root")