Назад | Перейти на главную страницу

Невозможно получить доступ к apache через порт 80 с внешнего

Я следил за множеством найденных мной решений, но они все еще не работают. Я могу получить доступ к серверу через порт 80 внутри моей сети, но я не могу получить доступ к другому, только через другой порт (например, 62, как я установил).


Файлы:

httpd.conf

Listen localhost:80
Listen *my_ip*:80
Listen *my_ip*:62

...

ServerName *a_free_DNS*:80

...

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI 

    MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

httpd-vhosts.conf

<VirtualHost *:80>
    ServerName *a_free_DNS*
    DocumentRoot C:/xampp/htdocs/home/
</VirtualHost>

httpd-xampp.conf

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    #    Require local
    Order deny,allow
    Allow from localhost
    Allow from 192.168.0.*
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Я поместил сюда только то, что считал важным, и что было изменено.


Я использую роутер Arris. Я установил следующее:

Виртуальные серверы:

Description     Inbound Port    Type    Private IP Address      Local Port
Server          20-81           TCP     192.168.0.123           20-81

Триггеры порта

Я попытался

Description     Outbound Port   Type    Inbound Port
Server          80-80           TCP     62-62

и

Description     Outbound Port   Type    Inbound Port
Server          62-62           TCP     80-80

и

Description     Outbound Port   Type    Inbound Port
Server          20-81           TCP     20-81

и любой.

Я тоже пробовал отключить брандмауэр роутера. Что мне делать?

Попробуйте использовать переадресацию портов вместо запуска порта. Ваш веб-сервер не устанавливает начальное соединение, которое вам нужно для запуска порта. Также начните с установки всего на один порт вместо диапазона.