Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dedicated server with 2 or more ips, howto setup apache ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Mgiese
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1630
Location: indiana

PostPosted: Mon Dec 01, 2008 5:09 pm    Post subject: dedicated server with 2 or more ips, howto setup apache ? Reply with quote

hi there,

i have a root server at euserv.de. there is 1 main ip adress and i am able to use 10 more.

but what do i have to change(where) on the network settings in order to use on of the 10 ip adresses ?
my provider told me i have to alter network-config files ...


thx a lot
_________________
I do not have a Superman complex, for I am God not Superman :D

Ryzen9 7950x (powersave governor) ; Radeon 7900XTX ; kernel 6.11.3 ; XFCE
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Mon Dec 01, 2008 5:31 pm    Post subject: Reply with quote

In gentoo, all you need to do is edit /etc/conf.d/net:

Code:

config_eth0=( "192.168.0.{1..10}/24 brd 192.168.0.255" )


That will map 192.168.0.1 - 192.168.0.10 to eth0. The routing may be a little trickier, though. You might want to look in /etc/conf.d/net.example.

After that you'll need to create a vhost for each ip in apache.
Back to top
View user's profile Send private message
Mgiese
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1630
Location: indiana

PostPosted: Mon Dec 01, 2008 5:35 pm    Post subject: Reply with quote

danomac wrote:
In gentoo, all you need to do is edit /etc/conf.d/net:

Code:

config_eth0=( "192.168.0.{1..10}/24 brd 192.168.0.255" )


That will map 192.168.0.1 - 192.168.0.10 to eth0. The routing may be a little trickier, though. You might want to look in /etc/conf.d/net.example.

After that you'll need to create a vhost for each ip in apache.


the thing is i have a main ip adress like :
config_eth0=( "85.33.66.77 brd 85.33.66.255" )

and an example ip for my sub-domain should look like this ?

config_eth0=( "91.43.123.34 brd 91.43.123.255" )


thx a lot
_________________
I do not have a Superman complex, for I am God not Superman :D

Ryzen9 7950x (powersave governor) ; Radeon 7900XTX ; kernel 6.11.3 ; XFCE
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Mon Dec 01, 2008 6:58 pm    Post subject: Reply with quote

That's not too difficult. I just figured they gave you a range like I got with my new provider. My old provider seemed to give me random IPs.

To do separate IPs in /etc/conf.d/net:

Code:

config_eth0=( "192.168.0.1/24 brd 192.168.0.255"
              "192.168.24.1/24 brd 192.168.24.255"
              "192.168.72.5/24 brd 192.168.72.255" )


You can have a lot of these following that layout. I only show three in the example though.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum