Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-14-2015, 02:32 PM   #1
LQ Newbie
Registered: Jun 2015
Location: planet of boredom
Distribution: debian
Posts: 18

Rep: Reputation: Disabled
how to assign 3 IPs to 3 different sites at debian server?

I am newbie here, so, I have domain question.

debian + virtualmin, when i created servers in virtualmin I assigned 3 different IPs to 3 different servers. I did the same at VPS hosting website, I created DNS zones.

for example: has IP has IP has IP

so, it is OK in virtualmin and VPS hosting site, but when I created wordpress sites, all 3 got the same IP:, it means if I try to type
I don't get anything,

now I visited domain website and I understood I can not change A input to IP than I must use for all 3 sites the same basic IP:
I saw the whole problem when i wanted to change IP at domain register. I logged in and I must add only basic IP.

by the way, all 3 wordpress websites are created in

it means virtualmin created users as I wanted, but how to give them different IPs? in virtualmin it is different but not in reality.

for example in Virtualmin - server configuration - dns records: A - IPv4 Address
at virtualmin server is also: A - IPv4 Address

but in reality it is working only if I type in web browser:

so, how to assign second IP to /home/

I said to friend to buy 3 IP dresses but now I don't know how to set it up for him, to have separated IP for each domain/wordpress site. in wordpress admin backend is also written basic address:
I had to install wordpress like that before I change IP at domain register (I migrate sites for him, it is all OK except I don't know how to assign 3 different IPs).

additional information:
I checked now and /var/lib/bind/ and everything is OK, there is assigned IP,, and not basic IP.
it is also correct for,

I checked and /etc/apache2/sites-available/
it is OK: <VirtualHost then there is IPv6address:80

Last edited by alanford; 06-14-2015 at 03:24 PM. Reason: additional info
Old 06-15-2015, 07:20 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,550

Rep: Reputation: 137Reputation: 137
I guess you better work with different name based virtual hosts instead of using different ips. You need several network cards for 3 IPs, don't you?
But I don't know Virtualmin.
Old 06-15-2015, 09:33 PM   #3
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,712

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
Could always try virtual interfaces. These show up the same as the base ethernet interface, but with a number attached( such as "eth0:1", "eth0:2") once created they work exactly like a different physical interface would.
Old 06-16-2015, 09:04 AM   #4
LQ Newbie
Registered: Jun 2015
Posts: 8

Rep: Reputation: Disabled
The file you want to find is the httpd.conf file for Apache web server. Towards the bottom of the file different virtual web servers can be configured for them to run on application initialization.
Old 06-16-2015, 11:54 AM   #5
LQ Newbie
Registered: Jun 2015
Location: planet of boredom
Distribution: debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
hosting company answered to me that I should assign additional IPs to the server, in etc/network/interfaces

auto eth0:0
iface eth0:0 inet static
auto eth0:1
iface eth0:1 inet static
after that restarting network (/etc/init.d/networking restart), then check it with ifconfig and then configuring Domains at domain register.

I did it and now it is working, I can use all IPs to ssh login to the server.

problem is only when I uploaded new wordpress, I can not start installation, I get download file instead of installation wizard.
now I try to find solution for that, apache <directory is OK:

<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
<Directory "/home/*/public_html/">
Options Indexes FollowSymLinks Includes ExecCGI
#Order allow,deny
#Allow from all
Require all granted
any idea why wp installation is not accessible?
when i type IP address IP
I get some file to download and it is the same when I type: IP

this is content of that file:
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.

* @package WordPress

* Tells WordPress to load the WordPress theme and output it.
* @var bool
define('WP_USE_THEMES', true);

Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

Last edited by alanford; 06-16-2015 at 11:56 AM.
Old 06-16-2015, 11:58 AM   #6
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,573
Blog Entries: 15

Rep: Reputation: Disabled
Originally Posted by alanford View Post
problem is only when I uploaded new wordpress, I can not start installation
Current WP installs have an upgrade option on the admin area that will do it for you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu Server 14.04 doesn't assign/recognize all available IPs TRUNoise Linux - Server 1 07-25-2014 02:06 PM
Assign multiple IPs to eth0? kenw232 Slackware 1 12-07-2013 04:59 AM
how to assign two IPs on same NIC arvind_77_99 Linux - Newbie 10 01-09-2008 06:25 PM
Assign different folders/users to different IPs on the same dedicated server yuye811 Linux - Server 2 12-17-2007 01:13 PM
how to assign 2 IPs to a computer dragon Linux - Networking 6 11-05-2002 09:07 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration