Posts Tagged Linux

How to fix “Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration” for apache2 in Ubuntu

If you got:

Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

message in error log of your apache2 web server under Ubuntu you need to do next:

Run this command in terminal with sudo

cp -arp /etc/apache2/mods-available/headers.load  /etc/apache2/mods-enabled/headers.load  

Restart Apache2:

Also run with sudo

/etc/init.d/apache2 restart

Tags: , , , ,

How to forward port into VirtualBox or How to connect with guest virtual machine via ssh

Let me describe my task.
I have installed Linux Ubuntu Server in my VirtualBox. I use this virtual machine for some experiments. I don’t want do some tasks on my physical PC.

To connect with this Virtual Machine I want to use SSH.

It can be done via forwarding physical PC port in Virtual Machine.

Here is ho to do this.
Run this commands in terminal:

$ VBoxManage setextradata "YOUR_VM_NAME" \
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP

$ VBoxManage setextradata "YOUR_VM_NAME" \
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22

$ VBoxManage setextradata "YOUR_VM_NAME” \
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222

Replace pcnet with e1000 if you are using Gigabit adapter

Now if you connect to your PC via ssh with 2222 port you will forwarded in Virtual Machine

ssh -p 2222 hudson@localhost

Where hudson – username on Virtual Machine
That’s all

Tags: , , , , ,

Hire me!