Results 1 to 4 of 4

Thread: How can I have Apache only repsond to one computer?

  1. #1
    Join Date
    Apr 2007
    Beans
    139
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Question How can I have Apache only repsond to one computer?

    So I've got a netbook that I'm running Apache on, and I only want it to serve and talk to my desktop. I don't know much about securing a server, and don't want others able to access it.

    So, how might I accomplish this?

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: How can I have Apache only repsond to one computer?

    Quote Originally Posted by SlaughterDog View Post
    So I've got a netbook that I'm running Apache on, and I only want it to serve and talk to my desktop. I don't know much about securing a server, and don't want others able to access it.

    So, how might I accomplish this?
    If you really want to prevent all other computers on the network from talking to Apache, you can use hosts.allow to block them on port 80. Another option is to have Apache deny them access to al webpages with Allow/Deny.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Apr 2007
    Beans
    139
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How can I have Apache only repsond to one computer?

    How would I set it to allow connections with my desktop?

  4. #4
    Join Date
    Jul 2008
    Beans
    105
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I have Apache only repsond to one computer?

    Create a file named .htaccess in your document root.
    Add the following lines to that file:
    Code:
    Order Deny,Allow
    Deny from all
    Allow from desktop_computer_ip
    Replace desktop_computer_ip in the code above with the ip address of your desktop computer.

    More info on this here: http://httpd.apache.org/docs/1.3/mod/mod_access.html
    Trying to help ... I hope it works ...
    Click here for my linux site
    Click here for some flash games

Bookmarks

Posting Permissions

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