- The links get broken right after I create them.
- I use
ln
correctly.ln -s SOURCE TARGET
Create symbolic link
$ sudo ln -s ./sites-available/examble.domain.com ./sites-enabled
Compile NGINX - fails due to broken symbolic links
Note: The problem is not related to NGINX, NGINX compilation was just there to help me realize that the problem exists. The solution described below applies to any other related problem.
$ sudo nginx -t
nginx: [emerg] open() "/etc/nginx/sites-enabled/example.domain.com" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
nginx: configuration file /etc/nginx/nginx.conf test failed
Confirm that the symbolic links are broken
$ file ./sites-enabled/example.domain.com
./sites-enabled/example.domain.com: broken symbolic link to ./sites-available/example.domain.com