【问题标题】:Xampp Apache server not responding to requestXampp Apache服务器没有响应请求
【发布时间】:2015-10-28 01:50:30
【问题描述】:

我已经在 Windows 8 64 位操作系统上安装了 Xampp 服务器 (xampp-win32-5.6.8-0-VC11-installer)。我已经在htdocs 目录中部署了HelloWorld 应用程序文件夹,并在httpd-vhosts.conf 文件中添加了一个虚拟主机,如下所示

 <VirtualHost localhost:80>
  DocumentRoot C:/xampp/htdocs/
  RewriteEngine On
  ProxyRequests Off
  ServerName localhost
  <Directory C:/xampp/htdocs/Aasifeweb/app/>
   Require all granted
   Allow from all
</Directory>
  <Location />
  ProxyPass   http://localhost/Aasifeweb/app/#/home
  ProxyPassReverse http://localhost/Aasifeweb/app/#/home
  ProxyPassReverseCookiePath  / http://localhost/Aasifeweb/app/#/home
  </Location>
</VirtualHost>

Apache 错误日志文件

[Fri Aug 07 19:23:26.149126 2015] [ssl:warn] [pid 2684:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.200160 2015] [core:warn] [pid 2684:tid 448] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Aug 07 19:23:26.268206 2015] [ssl:warn] [pid 2684:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.298225 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 configured -- resuming normal operations
[Fri Aug 07 19:23:26.298225 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00456: Apache Lounge VC11 Server built: Jan 28 2015 16:48:40
[Fri Aug 07 19:23:26.298225 2015] [core:notice] [pid 2684:tid 448] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Aug 07 19:23:26.301227 2015] [mpm_winnt:notice] [pid 2684:tid 448] AH00418: Parent: Created child process 3576
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:20
[Fri Aug 07 19:23:26.763535 2015] [ssl:warn] [pid 3576:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.885617 2015] [ssl:warn] [pid 3576:tid 448] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 07 19:23:26.918638 2015] [mpm_winnt:notice] [pid 3576:tid 448] AH00354: Child: Starting 150 worker threads.
[Fri Aug 07 19:23:29.637450 2015] [mpm_winnt:error] [pid 3576:tid 4852] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting

当我将虚拟主机配置添加到 httpd-vhosts.conf 文件时会出现此问题。当我删除虚拟主机时,服务器似乎响应了。部署的应用程序是用 angular-js 框架编写的

重要:请求似乎一次又一次地追加资源路径。但是,我不确定为什么会这样?

GET /Aasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23

当我在浏览器中点击http://localhost 时,它一直在加载。互联网上有很多解决方案,但对我没有任何帮助。

我尝试解决的问题

  • 我已经完成了netsh winsock reset
  • 我已经更改了端口 阿帕奇服务器
  • 我已禁用 Skype 和防病毒软件

请告诉我你的看法

【问题讨论】:

  • 你想用localhost:80ProxyPass http://localhost/Aasifeweb/app/#/home 指令完成什么?现在这读起来就像一个无限循环:“请为我(即http://localhost:80/XYZ)将任何请求XYZ传递给http://localhost:80/Aasifeweb/app/#/homeXZY”。因为这个请求是针对 localhost:80 的,所以再次应用规则,导致/Aasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23/homeAasifeweb/app/%23 的踪迹不断增长,并且服务器上的所有线程都耗尽(AH00326: Server ran out of threads to serve requests
  • 谢谢你,克里斯托夫。我能够解决这个问题。根本不需要代理通行证。我刚刚将 app 文件夹添加到文档根指令中。非常感谢您的帮助。

标签: windows-8 xampp apache2.4


【解决方案1】:

我根本不必使用ProxyPass。我只需要指向目录和 Angularjs - ng-route 负责页面路由。

<VirtualHost localhost:80>
  DocumentRoot C:/xampp/htdocs/Aasifeweb/app
</VirtualHost>

【讨论】:

    猜你喜欢
    • 2020-08-19
    • 1970-01-01
    • 1970-01-01
    • 2018-04-24
    • 2019-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多