Slim + EasyPHP - How to access from local network


#1

Hi there, its my first time with Slim, and i’m developing a REST Api.

When i access the URL using “localhost”(http://localhost:8000/svn/sites/branches/project_name/public/api/cidades), its works fine, but i need access by local network, by IP.

In this mode, my httpd.conf file is configured as follows: “Listen localhost:8000”.

If i replace the “localhost” of the httpd.conf for “*” and try to access the same Url, but by IP, this error occurs:

Not Found
The requested URL /svn/sites/branches/project_name/public/api/cidades was not found on this server.

The .htaccess that is in the same folder of the index.php, has the content as follows:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

Someone can help me about what i need to configurate to access the api across the local network? Thank’s.

Obs: I’m using EasyPHP on Windows 10.


#2

I think you don’t need to change any thing in your conf file for this. just check the IP assigned to your system and access url by it. for example

http://192.169.10.50/site/folder/index.php