Linux help (Ubuntu)

How to: Set up multiple ports on your apache server: (you may be getting the following error- NameVirtualHost *:80 Has No VirtualHosts )

look at your /etc/apache2/ports.conf

In that you should have the following for each port number:

  • NameVirtualHost *:{port}
  • Listen {port}

The reason for the error is you have set up a file in sites-available (with a soft link in sites-enabled)  at the beginning <VirtualHost *:800>

the 800 is the port number which need to be replicated in the conf file.

How to : Samaba restart on a linux ubuntu platform where you don’t have /etc/init.d/samba

use: sudo service smbd start

  • can’t see your box? use /etc/init.d/networking restart

Set up multiple IPs on your ubuntu server:

edit /etc/network/interfaces

you should see something like this:

#primary network interface
auto lo
iface lo inet loopback
auto eth0
#iface eth0 init dhcp
iface eth0 inet static
address 188.882.4.90
netmask 255.255.255.0
gateway 188.882.4.1

to add more simply add the following:

#secondary network interface
auto eth0:0
iface eth0:0 inet static
address 188.882.4.95
netmask 255.255.255.0
gateway 188.882.4.1

and another? add

#secondary network interface
auto eth0:1
iface eth0:1 inet static
address 188.882.4.96
netmask 255.255.255.0
gateway 188.882.4.1

in the above example teh following IP addresses would work:

188.882.4.90
188.882.4.95
188.882.4.96

when your done you’ll need to

sudo /etc/init.d/networking restart

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s