Ubuntu: How can I edit apache settings file on 17.10? [duplicate]


I've installed 17.10 , php7 and apache2 via apt. I'm not able to edit the apache files to use an specific directory to use the files. I've tried

sudo gedit /etc/apache2/apache2.conf but it returned:

No protocol specified Unable to init server: No se pudo conectar: Conexión rehusada (gedit:2064): Gtk-WARNING **: cannot open display: :0 I've also tried using sudo -s and the command.


Please see: Why don't gksu/gksudo work with Wayland?

It is a feature not a bug ! It is a design feature of Wayland that you can not start graphical applications as root from the terminal.

The solution is to edit the file with a non-GUI application, such as:

sudo nano /etc/apache2/apache2.conf  

Or, alternatively:

sudo vim /etc/apache2/apache2.conf  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »