Do I need to stop Apache for editing "/ etc / apache2 / sites-available / default"?

I am trying to edit the default file located at.

"/etc/apache2/sites-available/default" 

on my Ubuntu machine with Apache 2.2.8.

I want to do this to allow the use of .htaccess files. I uploaded the default file and edited it, and now I'm trying to upload it back to the server via SFTP. I always get permission to reject errors.

Could this be because Apache is running and using the file? I am the administrator on the machine, so I expect that I can overwrite the file. Thanks for any help.

+3
source share
2 answers

No, he does not need to be stopped.

ssh , root:

sudo nano /etc/apache2/sites-available/default

force-reload Apache , tux21b :

sudo /etc/init.d/apache2 force-reload
+6

Apache/2.4.7 , :

/etc/apache2/apache2.conf
-2

Source: https://habr.com/ru/post/1737602/


All Articles