I am trying to create soft links between config files containing server blocks in the sites-enabled and sites-available directories in /etc/nginx/.
The command I am using is:
sudo ln -s sites-available/foo.conf sites-enabled/
When I then execute:
ls -l
The result is:
lrwxrwxrwx 1 parallels parallels 27 Aug 6 20:44 immigrationinformation.conf -> immigrationinformation.conf
where the immigrationinformation.conf -> immigrationinformation.conf
part has a charcoal with red typeface.
When I then try and access this soft-link, I am told that it is broken.
When I create the soft-link in the sites-available directory i.e.
sudo ln -s sites-available/foo.conf sites-available/foo_link.conf
it works as normal. However, if I then move this to the sites-enabled directory, the link is broken again.
I can create the soft link via the file manager GUI but not via the command line. I can also create hard-links with no problem.
I suspected it was a permissions issue so I have played around with setting all permissions to 777 of both directories and the directories themselves and also changing the owners to something other than root, but still with no luck.
Any help would me much appreciated, thank you.
sudo ln -s sites-available/ sites-enabled/foo.conf
while standing inside the/etc/nginx
directory – Observatory