0

In page it says in order to solve a problem in Apache 2.4, we have to create a configuration file inside the conf-available directory. For example servername.conf.

sudo vi /etc/apache2/conf-available/servername.conf

And inside this we just need to add one line

ServerName localhost

I can do that but how do I save it ?

Zanna
  • 69,223
  • 56
  • 216
  • 327
mastodont
  • 1
  • 1
  • 1
  • 3
    See [How to exit the VIM editor?](http://stackoverflow.com/a/11828573/4440445) – steeldriver Jul 26 '16 at 11:43
  • You can also use `nano` or `gedit` editor if you don't know how to use `vi` still if you want to use, just follow the answer of steeldriver's comment. – d a i s y Jul 26 '16 at 11:52

1 Answers1

1

Apparently no-one wants to answer this question, maybe trying to avoid getting into an editor war...

You might want to check out How-To-Geek's Beginner's guide to Vi

As it says here, you first have to exit insert mode by pressing esc and then type :wq

w for write and q for quit. Obvious, surely? ;)

Zanna
  • 69,223
  • 56
  • 216
  • 327