Skip to content

Instantly share code, notes, and snippets.

@erowsika
Last active November 29, 2018 18:47
Show Gist options
  • Select an option

  • Save erowsika/df53a89461658089402d94a802ea9dbe to your computer and use it in GitHub Desktop.

Select an option

Save erowsika/df53a89461658089402d94a802ea9dbe to your computer and use it in GitHub Desktop.
ln -s
// distro Linux Mint 18.3 Sylvia
// linux 4.15.0-39-generic x86_64 (64 bit)
// nginx nginx/1.10.3
// running in local enviroment
// case valid with full path:
// result symlink: example -> /etc/nginx/sites-available/example
user@localhost:/etc/nginx# sudo ln -s sites-available/example /etc/nginx/site-enable/
// case valid without full path:
// result symlink: example -> ../sites-available/example
user@localhost:/etc/nginx/site-available# sudo ln -s example ../site-enable/
// case invalid
// result symlink: example -> sites-available/example
// cannot accessable throught browser
user@localhost:/etc/nginx# sudo ln -s sites-available/example site-enable/
// this issue "case invalid"
// basically when making symlink in linux, in this case like "case invalid"
// linux symlink succesfully created it, but cannot give the file which is at path site-available/example.
// in another word the file at path site-available/example never exist and resulting my example file config for nginx make the site inside this config file not accessable :)
//
// to keep in mine that ln -s need take valid source-path which can be:
// relative path to current directory
// or
// absolute path
// if ur source-path ambiguous like in "case invalid", well ur will get in trouble.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment