lucasnadalutti
lucasnadalutti

Reputation: 5948

Unexpected end of Apache in EasyPHP

I know there are some similar questions about this, but I found none in or outside SO that could solve my problem. I am an Apache beginner so please bear with me.

I am trying to make my Apache server listen to my network's IP so only machines that are connected to my network can access my application. So, my Apache configuration file has this line:

Listen [my network's IP]:80

However, this is giving me Unexpected end of Apache when trying to start it in EasyPHP. I also tried to add only the internal IPs (192.etc) of the machines that I wanted to listen instead, but had no luck either.

Any ideas of what might be causing this?

Upvotes: 0

Views: 696

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94672

Change the Listen command back to what it was before, probably something like

Listen 0.0.0.0:80
Listen [::0]:80

In order to make Apache only allow connections from your network (subnet) you then have to find this section of the httpd.conf file

For Apache 2.2.x

<Directory "c:/path/to/www/">

    Options Indexes FollowSymLinks

    Order Deny,Allow
    Deny from all
    Allow from localhost 127.0.0.1
    Allow from 192.168.1              <-- this is the new line
</Directory>

Make sure you use only the first 3 of the 4 quartiles and any ip in that range will be allowed.

For Apache 2.4.x

<Directory "c:/path/to/www/">

    Options Indexes FollowSymLinks

    Require local
    Require ip 192.168.1              <-- this is the new line
</Directory>

Make sure the 192.168.1 is the correct first 3 quartiles for your networks subnet!!!

Upvotes: 2

Related Questions