Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I Want to do: access my zend framework app from other computer in my private lan

e.g: //192.168.x.x/my_app

  • 192.168.x.x is my ubuntu server ip (from ifconfig)
  • my_app is a virtualhost that I set in the server (/etc/hosts and apache2).

In my server if I do //my_app it works.

In another pc if I do //192.168.x.x it shows "It's working" default message but if I do //192.168.x.x/my_app it "Not found on this server"

Server settings

/etc/hosts localhost my_app


<VirtualHost *:80>
        DocumentRoot "/var/www"
        ServerName localhost:80

<VirtualHost *:80>
        ServerName my_app
        DocumentRoot "/var/www/my_app/public"

        SetEnv APPLICATION_ENV "development"

        <Directory "/var/www/my_app/public">
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all

Hope someone can help me. Thanks!

share|improve this question

migrated from Jun 6 '11 at 13:35

This question came from our site for professional and enthusiast programmers.

Add your ServerName and your IP to another pc's /etc/hosts file. Of course you should have ServerName in your virtualhost file.

share|improve this answer
I did that in system32/drivers/etc/host 192.168.x.x my_app but isn't that for using my_app instead of the ip in the browser of my "guest" machine (windows 7 in this case)? Sorry if I'm saying something stupid networks is not strong in my knowledge base :(. Thanks for replying :) – Andrés C. Jun 5 '11 at 21:09
Ok..i'm sooo stupid. Can't tell why but I try again and IT WORKS!! Thanks again, I read that "host thing" in every post over the internet but yours really touch me :P. THANK YOU. – Andrés C. Jun 5 '11 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.