Access a Zend application from another computer in the LAN (working with LAMP)

696 Views Asked by At

Hello I have a LAMP server setup on an Ubuntu machine and a Zend Framework project.

I made a virtual host in my /etc/apache2/sites-available, enabled it with a2ensite command and everything works great on localhost but I have a problem accessing the application from another computer in my LAN using my IP

If I go to 192.168.x.x/application_name/public (that is where the index.php is) i get the folder listing.

PS: phpmyadmin works (192.168.x.x/phpmyadmin)

Am I missing some configurations?

My virtual host

<VirtualHost *:80>
ServerAdmin xx@localhost
ServerName application.local
ServerAlias www.application.local
DirectoryIndex index.php
DocumentRoot /var/www/application/public/
</VirtualHost>

1

There are 1 best solutions below

0
On

All you need to do is edit the hosts file on the 2nd machine to add an entry for

192.168.x.x    application.local

where 192.168.x.x is the IP address of the machine with the app on, and application.local matches the value in the ServerName of your vhost. Then just open a browser and go to http://application.local/