Create symlink


A symlink (or symbolik) link allows creating an alias for a file or folder in a different folder with a different name. This can come in handy for accessing special folders in the structure that don’t need to be made public, or creating special rules or exception in server access.


A symlink is created easy with the following command:

$ ln -s {/path/to/file-or-folder} {symlink-alias}

For example:

$ ln -s /htdocs/myproject/important_folder /htdocs/mylink

Then we can set up for example a location block in our nginx configuration, that points to that folder:

location /visible_link/ {
root /htdocs/mylink;

About admin

Just another php developer trying to give something back to the community.
This entry was posted in Linux, Tools and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s