Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jun 24, 2010 7:01 am 
Offline
Newbie

Joined: Thu Jun 24, 2010 6:31 am
Posts: 2
I would appreciate if anyone could help me out with this.

Using:
* linode 512
* ubuntu 9.10
* nginx+fcgi
* default dhcp
* using http://firehol.sourceforge.net for security (easy config)
* default linode IP: 88.88.88.88
* brand-new linode IP (not private IP): 99.99.99.99
* default gateway IP for this linode: 77.77.77.77
* second gateway IP for this linode: 78.78.78.78

My domain is: example.com currently on 88.88.88.88
and things like http://88.88.88.88/hello.php are working
(example.com/hello.php & 88.88.88.88/hello.php = same)

I have a new domain: example.net
I would like to run this domain on the 2nd IP (99.99.99.99)
and http://99.99.99.99/hello2.php should work
but http://99.99.99.99/hello.php should return 404


step 0:
Code:
get new IP using Linode manager


step 1:
Code:
/etc/network/interfaces
-------
auto lo
iface lo inet loopback

auto eth0 eth0:0

iface eth0 inet static
 address 88.88.88.88
 netmask 255.255.255.0
 gateway 77.77.77.77

iface eth0:0 inet static
 address 99.99.99.99
 netmask 255.255.255.0
 gateway 78.78.78.78


step 2:
Code:
/etc/init.d/networking restart


step 3:
Code:
#http://forum.nginx.org/read.php?2,2479

server {
   #default linode IP
   listen 88.88.88.88:80;
   ...
}

server {
   #second linode IP
   listen 99.99.99.99:80;
   ...
}


step 4:
Code:
reboot


step 5:
Code:
#ping all ips and gateways
ping 88.88.88.88
ping 99.99.99.99
ping 77.77.77.77
ping 78.78.78.78


step 6:
Code:
...


Not working.


Last edited by red78 on Fri Jun 25, 2010 6:12 am, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Thu Jun 24, 2010 12:30 pm 
Offline
Junior Member

Joined: Sat Jul 11, 2009 7:19 am
Posts: 30
Location: Martinique
In your first server definition, you have
Code:
listen 80;

I guess this makes ngnix listen on port 80 for any IP, and serve the first site everytime.

Try removing that.


Top
   
 Post subject:
PostPosted: Fri Jun 25, 2010 6:17 am 
Offline
Newbie

Joined: Thu Jun 24, 2010 6:31 am
Posts: 2
@tinono OK, I fixed that and rebooted, I think it could be a problem with fcgi :cry:


Top
   
 Post subject:
PostPosted: Fri Jun 25, 2010 6:57 am 
Offline
Senior Newbie

Joined: Thu Apr 21, 2005 9:32 am
Posts: 11
Website: http://www.tangloid.net/
What does not work? Can you see plain html pages at those virtual servers? What are your fcgi starting scripts? Do you use spawn-fcgi for that?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group