Jump to content

Recommended Posts

Hello freaks,

 

I did a quick search on the forums to see if there was a solution to or someone's past post that would lead me into the right area... but I haven't found it yet.

 

I am trying to get my machine running fedora 14 to run as an internal (only visible on my network) web server.  I have apache and all the dependencies running on the one machine working but cannot get my head around this static ip and forwarding necessary to see it from other computers.

 

 

however when I restarted apache it had the following error occured

 

(99) cannot assign requested address: make_sock: could not bind to address 192.168.168.168:80 no listening sockets available, shutting down

 

I plan on researching this error I just wanted to reach out for some help to speed up the process.  THANK YOU!

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/245910-static-ip-fedora-14-webserver/
Share on other sites

The only reason you'd need to do anything to your router is if you were creating a DHCP client reservation for the server, so it could use DHCP to obtain the same IP address every time, along with all of the other pertinent info like DNS servers, etc. As long as the server has an IP address in the same subnet as the rest of the computers, it should be visible to them.

 

well I will go back a step...

 

I currently access my webpages on the webserver computer via the ip address of that machine.  When I try that IP address on another machine on my network I get a "Timed OUt" error.  I did a little forum jumping and thought I was on the right track with setting the webserver to a static IP and then port forward for port 80 for that machine.

 

It seems like this isn't necessary for what I am looking for; what do you suggest I do to see these pages on my other machines?

 

Thank you

The server should indeed have a static IP address. Are all of the computers on the same logical subnet? You've given 192.168.168.168 as the server's IP address. With a subnet mask of 255.255.255.0, all of the other computers would need to have IP addresses in the range of 192.168.168.1 - 192.168.168.254, and a subnet mask of 255.255.255.0. Is that the way it's currently set up?

No, currently my other machines operate within the realm of 192.168.1.2 - 192.168.1.9.  I wanted to pick a static Ip I would remember and one that wouldn't be assigned to another machine; I wasn't aware of this subnet and gateway requirements.  If i change the static IP of the webserver machine to 192.168.1.X (>10) should that fix the problem?

 

---Side note--

After I changed to a static ip through my router I restarted my computer and noticed that the IP associated with the machine was still the dynamic one given by the router and I wasn't able to connect to the internet.  Do I have to tell fedoria to switch to the IP I created?

all of the other computers would need to have IP addresses in the range of 192.168.168.1 - 192.168.168.254
... i went back through my router and have now changed it to 192.168.1.50 so they can be in the same range.

 

to set my fedora machine to static ip address I did the steps in this tutorial: http://www.tech-howto.com/2010/11/26/constant-static-ip-address-for-fedora-14/comment-page-1/#comment-268

 

The machine is now using the correct static ip address 192.168.1.50 however I am still not able to go online.  This is my ifconfig output and the two files I added/edited ifcfg-eth0 and network: 

 


[user@webserver ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:2F:A5:61:93  
          inet addr:192.168.1.50  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:2fff:fea5:6193/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:154 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:30202 (29.4 KiB)  TX bytes:4321 (4.2 KiB)
          Interrupt:23 Base address:0x4000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:480 (480.0 b)  TX bytes:480 (480.0 b)

#ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.1.50
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
DNS1=192.1681.1.1
DNS2=71.243.0.12

#network
NETWORKING=yes
HOSTNAME=webserver
NTPSERVERARGS=iburst(optional)
GATEWAY=192.168.1.1

Go online? You mean from the server? Have you tried pinging an outside host by IP address (a known valid DNS server is a good choice)? If that works, try pinging a host (like www.google.com) by name and make sure the name resolves to an IP address.

Go online? You mean from the server?

 

Yea I wanted to test if setting up the static Ip worked and I tried going online through firefox and I wasn't able to bring up google.

 

Also, I still wasn't able to access my website through my other computers but figured they are one in the same problem.

 

When I get home tonight I will trying pinging a dns... will one of these suffice? http://www.tech-faq.com/public-dns-servers.html

 

 

  • 1 month later...

Why not just leave your linux box as DHCP, and set your router to reserve a given IP based on your servers MAC address?  :S Seems like the easiest thing to do...

 

This will, for all intents and purposes, set your server to a static IP. It's how I've got mine set up.  Your router reserves the IP you tell it to, and will skip over assigning it to anything other than the MAC address associated with it (your servers MAC)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.