View previous topic :: View next topic |
Author |
Message |
Mgiese Veteran
Joined: 23 Mar 2005 Posts: 1630 Location: indiana
|
Posted: Mon Dec 01, 2008 5:09 pm Post subject: dedicated server with 2 or more ips, howto setup apache ? |
|
|
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
Ryzen9 7950x (powersave governor) ; Radeon 7900XTX ; kernel 6.11.3 ; XFCE |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Mon Dec 01, 2008 5:31 pm Post subject: |
|
|
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 |
|
|
Mgiese Veteran
Joined: 23 Mar 2005 Posts: 1630 Location: indiana
|
Posted: Mon Dec 01, 2008 5:35 pm Post subject: |
|
|
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
Ryzen9 7950x (powersave governor) ; Radeon 7900XTX ; kernel 6.11.3 ; XFCE |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Mon Dec 01, 2008 6:58 pm Post subject: |
|
|
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 |
|
|
|