Roadblock on Apache Gate 80

Asked

Viewed 4,217 times

0

An application for a control is being developed within the company, but when I try to use apache on other machines to have access returns a lock

Forbidden

You don’t have permission to access /backup on this server. Apache/2.4.18 (Win64) PHP/5.6.19 Server at 192.168.123.22 Port 80

Note: If you put in the 8080 it recognizes normally, but it needs to be 80, we are using the latest version of apache.

  • Close Skype...

  • @Gumball , if there is another application on this port it will not work on any machine ?

  • You’re using is Wamp right?

  • @Gumball if your skype is on port 80(default), no need to close, just set a different port manually in skype settings. :)

  • 1

    @I know Florida... but he was supposed to deduce that.

2 answers

4

The answer Forbidden means that you are accessing yes Apache, but the page is not authorized, I mean this is not a problem with the port, it is just a permissions problem.

Wampserver

You’re probably using Wampserver, if this is the case just click on the option Put online (or Put online if in English) like this:

wamp

Others other than Wampserver

If you are using another server type that uses Apache you must edit httpd.conf

It must be something like (use the Ctrl+F to look for something similar):

<Directory "d:/wamp/www">
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

In this case blocks everyone and releases only the last 3, then just add what will release, in case the ip is 192.168.123.22 (if it is fixed), then it would be something like:

<Directory "c:/wamp/www">
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
     Allow from 192.168.123.22 #Ip da sua maquina
</Directory>

And then I restarted Apache, restart the computer (sometimes just do logoff on Windows)

Or remove everything (make a backup of httpd.conf first, before editing anything)

And then I rebooted Apache.

You said it only occurs with port 80, this is because the settings may be on VirtualHost:

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot c:/wamp/www
    <Directory  "c:/wamp/www/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

The Require local may be the reason for the lock as well (remember before removing anything take a backup).

Documentation: https://httpd.apache.org/docs/2.4/howto/access.html

2

Open the command prompt in administrative mode and run:

netstat -np TCP | find ":80"

The Ips on the left is your local IP. The above command will return tens or hundreds of results if you are browsing or with something connected to the internet.

A quick way to filter and get what matters is to put your IP in command

Example, if your IP is 192.168.1.10

netstat -abnop TCP | find "192.168.1.10:80"

It will return empty if there is nothing.

If you have anything, you will return:

TCP    192.xx    192.xx    ESTABLISHED    4444

The last number is the PID of the case in question.

To find out the name of the process:

tasklist /fi "pid eq 4444"

Returns:

Image Name      PID      Session Name    Session#     Mem Usage
processo.exe    4444     nome_sessao     2            10k

So you get the name of the program that is occupying the door you want, in case the door 80.

Two programs cannot occupy the same door.

If you want Apache on this port that is in use, you must stop the other program or change it to another port.

Note: Your question still seems confusing because the error message for when the port is in use is different from the message that is in the question.

The message is usually related to reading and writing permission from a particular physical location.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.