This is sort of recurring question in here, but I read all the answers I could found and it did not made it clearer to me what should I do, please help me since I am completely new to Ubuntu and VPS altogether. I am trying to deploy simple website I developed through django.
While following this guide (and some other various material), I stumbled to the point where according to the guides I have to (quoting guide):
Now we need to set up a symbolic link in the
/etc/nginx/sites-enableddirectory that points to this configuration file. Change directories to/etc/nginx/sites-enabled.I have done that with:
cd /etc/nginx/sites-enabledOnce there, run this command:
sudo ln -s ../sites-available/myprojectSince from the beginning of the guide I used
skaiciuokle_webproject name instead ofmyproject, that is the only place where I deviate from guide and use the command:sudo ln -s ../sites-available/skaiciuokle_web
After running the sudo ln -s command I get this error:
ln: failed to create symbolic link '/etc/nginx/sites-enabled/skaiciuokle_web': File exists`Despite probably reading all the previous questions, I still cannot understand why I am getting this error, because I (almost) followed the guides to the letter.
Could somebody point me to the right direction?
51 Answer
You can overwrite the existing file ../sites-enabled/myproject by forcing ln like this
sudo ln -sf ../sites-available/myproject ../sites-enabled/
then
sudo service nginx restart