XAMPP:连接到本地修补程序吗? [执着的] [英] XAMPP: Connecting to localhost fix? [Persistent]

查看:51
本文介绍了XAMPP:连接到本地修补程序吗? [执着的]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在计算机上安装了XAMPP Windows 1.8.2.端口80是安全的,Apache可以使用它,没有问题,也没有任何端口冲突.我总是打开Xampp并在控制面板中启动Apache和MySQL模块.这两个模块都在运行,每当我单击Apache admin按钮时,它会将我重定向到localhost页面,需要一段时间才能加载,然后出现此错误.

I just installed XAMPP Windows 1.8.2 in my computer. Port 80 is secured and in use by Apache there are no problems nor any port conflicts. I always open Xampp and start both Apache and MySQL Modules in the control panel. Both modules are running, Whenever I click on the Apache admin button it redirects me to the localhost page, It takes a while to load and then this error shows up.

如果对您来说太小,则错误提示:网络错误(tcp_error)

If it's too small for you guys the error says: Network Error (tcp_error)

发生通信错误:连接被拒绝" Web服务器可能已关闭,太忙,或遇到其他问题而无法响应请求.您不妨稍后再试.

A communication error occurred: "Connection refused" The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

要获取帮助,请与您的网络支持团队联系.

For assistance, contact your network support team.

如果我尝试使用127.0.0.1,则会显示另一个错误:

Another error shows up if i try with 127.0.0.1:

本地主机更改为130.147.134.66注意:我使用代理网络,IP地址为130.147.134.251.

The localhost changes to 130.147.134.66 NOTE: I use a proxy network and the IP address is 130.147.134.251.

我尝试更改和更新C:\Windows\System32\Drivers\Etc\hosts.中的主机文件,但问题仍然存在.

I have tried changing and updating the hosts file in the C:\Windows\System32\Drivers\Etc\hosts. but the problem still persists.

请记住,我是Xampp的新手,距我开始使用phpMyAdmin和MySQL仅一个星期的时间

Keep that in mind I am new to using Xampp, and its been only a week since I started using phpMyAdmin and MySQL

我的httpd-xampp.conf文件:

My httpd-xampp.conf file:

#
# XAMPP settings
#

<IfModule env_module>
    SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
    SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
    SetEnv PHPRC "\\xampp\\php"
    SetEnv TMP "\\xampp\\tmp"
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

#
# PHP-CGI setup
#
#<FilesMatch "\.php$">
#    SetHandler application/x-httpd-php-cgi
#</FilesMatch>
#<IfModule actions_module>
#    Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
#</IfModule>


<IfModule php5_module>
    PHPINIDir "C:/xampp/php"
</IfModule>

<IfModule mime_module>
    AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
    AllowOverride None
    Options None
    Require all denied
    <Files "php-cgi.exe">
          Require all granted
    </Files>
</Directory>

<Directory "C:/xampp/cgi-bin">
    <FilesMatch "\.php$">
        SetHandler cgi-script
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler None
    </FilesMatch>
</Directory>

<Directory "C:/xampp/htdocs/xampp">
    <IfModule php5_module>
        <Files "status.php">
            php_admin_flag safe_mode off
        </Files>
    </IfModule>
    AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
    Alias /security "C:/xampp/security/htdocs/"
    <Directory "C:/xampp/security/htdocs">
        <IfModule php5_module>
            <Files "xamppsecurity.php">
                php_admin_flag safe_mode off
            </Files>
        </IfModule>
    Order deny,allow
    Deny from all
    Allow from localhost
   </Directory>

    Alias /licenses "C:/xampp/licenses/"
    <Directory "C:/xampp/licenses">
        Options +Indexes
        <IfModule autoindex_color_module>
            DirectoryIndexTextColor  "#000000"
            DirectoryIndexBGColor "#f8e8a0"
            DirectoryIndexLinkColor "#bb3902"
            DirectoryIndexVLinkColor "#bb3902"
            DirectoryIndexALinkColor "#bb3902"
        </IfModule>
        Require all granted
   </Directory>

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
    Order allow,deny
    Allow from all
        Require all granted
    </Directory>

    Alias /webalizer "C:/xampp/webalizer/"
    <Directory "C:/xampp/webalizer">
        <IfModule php5_module>
            <Files "webalizer.php">
                php_admin_flag safe_mode off
            </Files>
        </IfModule>
        AllowOverride AuthConfig
        Require all granted
    </Directory>
</IfModule>

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8 \
        fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
        fe80::/10 169.254.0.0/16

    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

推荐答案

已经为您提供了答案.
看第二张照片.

It's already giving you the answer.
Look at your second picture.

This setting can be configured in the file "httpd-xampp.conf"

如何修复"此问题:

How to "fix" this:

其中之一:
禁用本地地址的代理

或:

either:
disable your proxy for local addresses

or:

   1) open the file "\xampp\apache\conf\extra\httpd-xampp.conf" in a texteditor
   2) replace "Allow from localhost" with "Allow from YOURLOCALIP" (2 times)
   3) save the file
   4) restart Apache

请参见 http://www.apachefriends.org/f/viewtopic .php?t = 32503#p131519 也是

它在第120-128行:

It's in line 120-128:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8 \
        fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
        fe80::/10 169.254.0.0/16 \
        YOURLOCALIP <--------------------------------------------------------------

    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

这篇关于XAMPP:连接到本地修补程序吗? [执着的]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆