Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm doing this:

sudo ln –s /etc/apache2/sites-available/LoginProject /etc/apache2/sites-enabled/LoginProject

And I get:

ln: target `/etc/apache2/sites-enabled/LoginProject' is not a directory

/etc/apache2/sites-available/LoginProject it's a file

edit:

this command:

ls -l /etc/apache2/sites-enabled/LoginProject /etc/apache2/sites-available/LoginProject

outputs:

ls: cannot access /etc/apache2/sites-enabled/LoginProject: No such file or directory
-rw-r--r-- 1 root root 526 2011-09-27 18:40 /etc/apache2/sites-available/LoginProject

edit 2:

$ls /etc/apache2/sites-available/
default  default-ssl  LoginProject
$

$ls /etc/apache2/sites-enabled/
$
share|improve this question
1  
Can you add the ls -l /etc/apache2/sites-enabled/LoginProject /etc/apache2/sites-available/LoginProject output? –  Beaming Mel-Bin Sep 27 '11 at 23:08
    
sure, there I added it –  fceruti Sep 27 '11 at 23:11
add comment

4 Answers

up vote 3 down vote accepted

Try: sudo a2ensite LoginProject

You could also do sudo ln –s /etc/apache2/sites-available/LoginProject /etc/apache2/sites-enabled/

share|improve this answer
    
The file is: /etc/apache2/sites-available/LoginProject Anyway, I tried changing the order, and didn't worked –  fceruti Sep 27 '11 at 23:22
    
Sorry that was wrong, see edit –  xofer Sep 27 '11 at 23:23
    
Thanks! the a2ensite LoginProject worked! didn't tried the other command. It's still very weird... I really don't get it –  fceruti Sep 27 '11 at 23:27
    
Normally, ln accepts 2 file paths and if it is more than two, the target must be a directory. I still wonder why it counts your parameters like this way!!! –  SparX Sep 27 '11 at 23:33
add comment

Try ln with single argument like below and see whether it helps,

cd /etc/apache2/sites-enabled/ ; sudo ln -s /etc/apache2/sites-available/LoginProject
share|improve this answer
add comment

You probably copied and pasted the ln -s command from another source and the system inserted the wrong type of -. Try deleting the - and typing it again manually.

share|improve this answer
add comment

Try quoting the directories and terminating the sudo command arguments like so:

sudo -- \ln –s "/etc/apache2/sites-available/LoginProject" "/etc/apache2/sites-enabled/LoginProject"
share|improve this answer
    
Nope, this didn't make the trick –  fceruti Sep 27 '11 at 23:21
    
Made an edit. Try it again now. –  Beaming Mel-Bin Sep 27 '11 at 23:24
    
I copy pasted that and got: ln: target `/etc/apache2/sites-enabled/LoginProject' is not a directory –  fceruti Sep 27 '11 at 23:25
    
Man. I'm stomped. I've only seen that when the target exists. But your ls output shows that it does not. Wondering if it's an SELinux or ACL issue of some kind. Meh, you got it to work with @fuscata's answer. Good job :-) –  Beaming Mel-Bin Sep 27 '11 at 23:27
    
Thanks for your time man, @fuscata got a solution, maybe not an answer to why that happend, but still... thanks again –  fceruti Sep 27 '11 at 23:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.