Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi All, I want to make my Linux box serve up web pages in my company intranet. Normally in Windows/IIS, you just author the webpage, and you can use the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    4

    intranet web server


    Hi All,
    I want to make my Linux box serve up web pages in my company intranet.
    Normally in Windows/IIS, you just author the webpage, and you can use the machine name like:

    (http://WINMACH2/myhomepage.html)

    How the heck do I do this with my linux box?

    I've tested it by hitting my linux box from my windows box no problem (I get the apache test page) using the ip address. So network connectivity is there, the webserver on linux works fine.

    Problem - we use dynamic IP addresses!

    So my question is, how do I allow company LAN machines access my linux web server, not by IP address, but by assigning it a machine name the same way windows IIS normally does? I've scoured the internet and nothing...everything is about internet, not a private LAN web server.

    thanks in advance.

  2. #2
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058

    Re: intranet web server

    Quote Originally Posted by jrmsmo
    Hi All,
    I want to make my Linux box serve up web pages in my company intranet.
    Normally in Windows/IIS, you just author the webpage, and you can use the machine name like:

    (http://WINMACH2/myhomepage.html)

    How the heck do I do this with my linux box?

    I've tested it by hitting my linux box from my windows box no problem (I get the apache test page) using the ip address. So network connectivity is there, the webserver on linux works fine.

    Problem - we use dynamic IP addresses!

    So my question is, how do I allow company LAN machines access my linux web server, not by IP address, but by assigning it a machine name the same way windows IIS normally does? I've scoured the internet and nothing...everything is about internet, not a private LAN web server.

    thanks in advance.
    Add static IP internal address
    ie 192.168.1.10 or whatever your network is then add it to your internal DNS if you do not have an internal dNS then add it you your host files
    ipaddress <tab><tab> whateverthenameofserver
    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

  3. #3
    Just Joined!
    Join Date
    May 2005
    Posts
    4

    That went completely over my head

    wow, you're going to have to dumb that down a bit.
    I'm only 4 weeks in using linux.

    I'm pretty sure I don't have an Internal DNS.

    I've edited my hosts file /etc/hosts to contain:

    127.0.0.1 myLinux localhosst.localdomain localhost myLinux

    I've run the hostname command in the terminal:

    hostname myLinux

    I've edited /etc/sysconfig/network to contain:

    NETWORKING=yes
    HOSTMANE=myLinux
    DHCP_HOSTNAME=myLinux

    I've set it in terminal by typing:

    echo myLinux > /proc/sys/kernel/hostname


    If I open a web page in Linux and type the URL:
    http://myLinux

    I get my test page.
    However, if I try to access it from another computer on my LAN (a windows box) by typing in the URL:
    http://myLinux

    Nothing.
    I still can only get to it by IP address.
    Help!

  4. #4
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908

    Re: That went completely over my head

    Quote Originally Posted by jrmsmo
    However, if I try to access it from another computer on my LAN (a windows box) by typing in the URL:
    http://myLinux
    That will never work because the Windows box doesn't know what myLinux is. You have to add an entry to C:\Windows\hosts (note that it has no extension), if you don't have this file create it.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  5. #5
    Just Joined!
    Join Date
    May 2005
    Posts
    4
    I don't have a c:\windows\hosts file.
    which I wouldn't want to do anyway, because I want several machines on my corporate LAN to see my apache website.

    Right now windows boxes CAN see my webpage, but they have to type in the IP address of the linux box.

    This is no good...the IP address is dynamic.

    All I want is to have a stupid web page running on my Linux box that can be seen by boxes on the LAN. I need to resolve the name of the linux box to the dynamic IP address, the connectivity is there, becuase 1) I can hit the linux test page on my windows machine 2) I can ping it.

    I dont care how I do it, or how ugly the solution is, but there is NOTHING on the internet on how to do this and it seems like a pretty simple thing, hell, IIS does it out of the box.

    Any help, with clear steps for a fairly new Linux user would be appreciated.

  6. #6
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058

    Re: That went completely over my head

    Quote Originally Posted by jrmsmo
    wow, you're going to have to dumb that down a bit.
    I'm only 4 weeks in using linux.

    I'm pretty sure I don't have an Internal DNS.

    I've edited my hosts file /etc/hosts to contain:

    127.0.0.1 myLinux localhosst.localdomain localhost myLinux

    I've run the hostname command in the terminal:

    hostname myLinux

    I've edited /etc/sysconfig/network to contain:

    NETWORKING=yes
    HOSTMANE=myLinux
    DHCP_HOSTNAME=myLinux

    I've set it in terminal by typing:

    echo myLinux > /proc/sys/kernel/hostname


    If I open a web page in Linux and type the URL:
    http://myLinux

    I get my test page.
    However, if I try to access it from another computer on my LAN (a windows box) by typing in the URL:
    http://myLinux

    Nothing.
    I still can only get to it by IP address.
    Help!
    If you get your test page it is working
    You need to put your website in place of the test page
    I need to know what distro to tell you exactly where it is?

    check your pm
    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

  7. #7
    Just Joined!
    Join Date
    May 2005
    Posts
    4
    I actually figured it out,
    What I was asking for was for the linux box to "act" like a windows machine using WINS/NetBIOS.

    So I already had samba installed. I left the above configuration that I listed before, plus I did the following:

    1) I editied /etc/samba/lmhosts:

    127.0.0.1 localhost myLinux

    2) I edited /etc/samba/smb.conf to make sure the following entries were uncommented/edited:

    workgroup = mygroup
    severstring = myLinux
    remote announce = 192.168.1.255 192.168.2.44
    name resolve order = hosts wins lmhosts bcast
    dns proxy = yes

    (note the above I pretty much guessed/trial and order, so feel free to critisize the above settings)

    3) finally I opened the services GUI and checked off smb, which includes the daemons smbd, nmbd


    To check, i picked a windows box on the LAN and I browsed the network, I actually say my workgroup "Mygroup", expanded it and saw myLinux.

    Also since now I have set the WINS as a sort of LAN DNS where machine name can be resolved to IP address, if I open a web page and type in:

    http://mylinux

    I get my test page.

    I know the above config, is bad for internet, but for an Intranet testing machine, it works perfect.

    Thanks for all the comments.

  8. #8
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    If It works I won't critisize. Good Job
    Mike
    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

  9. #9
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    Thanks - this was a great mini HOWTO

    Thanks jrmso, I used your procedures and got this working in my corporate environment as well. I appreciate you going back and posting your solution.

  10. #10
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    Jumped the gun... :(

    I can see the new servername in my domain when I look for my linux server in "Entire Network," so I know the Samba appears to be working.

    However, when I type http://intranet (servername is intranet), it doesn't resolve to the IP address. This works, of course, on my Linux mozilla browser when I type in http://intranet.

    I followed all the instructions above that jrmsmo posted. Any help or ideas? TIA.

    Btw, I did multiple reboots, restarts, and apache restarts...

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •