Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache "Connecting..." and hangs |
|
Author |
|
alan.lee
Joined: 28 Jan 2014 Posts: 4 Location: Hong Kong
|
Posted: Tue 28 Jan '14 11:58 Post subject: Apache "Connecting..." and hangs |
|
|
I have recently installed Apache 2.4.7, PHP 5.5.8 and virtual hosts on Windows Vista.
Now I often experience a strange connection hangs problem:
(1) Open Chrome and Internet Explorer, both connect to one of the virtual hosts
(2) Repeatedly do some random actions and refreshes in both browsers
(3) After a while, the browsers will show "Connecting..." and hangs. When it happens, if I open a new tab and connect to another virtual host, it will also hang.
(4) The only way to solve the "Connecting..." status is to stop loading the initial page, and refresh the browser. After that, all other hanging connection to other virtual hosts can load.
The way I have setup virtual hosts is edit the file C:/WINDOWS/system32/drivers/etc/hosts and it looks like:
Code: |
127.0.0.1 localhost
::1 localhost
127.0.0.1 dpi.vh.com
127.0.0.1 pi.vh.com
|
And I have edited the file httpd-vhosts.conf like this:
Code: |
<Directory D:/wwwroot>
Require all granted
</Directory>
<VirtualHost *:8080>
ServerName localhost
DocumentRoot "D:/wwwroot"
<Directory "D:/wwwroot/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" combined
</VirtualHost>
<VirtualHost *:8080>
ServerName dpi.vh.com
ServerAlias dpi.vh.com
DocumentRoot "D:/wwwroot/dpi.vh-test.com/site/"
AddDefaultCharset UTF-8
SetEnv KOHANA_ENV PRODUCTION
<Directory "D:/wwwroot/dpi.vh-test.com/site/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/dpi.vh-test.com-error.log"
CustomLog "logs/dpi.vh-test.com-access.log" combined
</VirtualHost>
<VirtualHost *:8080>
ServerName pi.vh.com
ServerAlias pi.vh.com
DocumentRoot "D:/wwwroot/pi.vh-test.com/site/"
AddDefaultCharset UTF-8
SetEnv KOHANA_ENV PRODUCTION
<Directory "D:/wwwroot/pi.vh-test.com/site/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "logs/pi.vh-test.com-error.log"
CustomLog "logs/pi.vh-test.com-access.log" combined
</VirtualHost>
|
I have .htaccess file in both directories like this:
Code: |
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteRule gallery_(.*).xml mread/detail/$1 [PT]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
|
I am sure the connection hangs problem is not due to the PHP code, since I have added a few lines at the start of index.php to write log into txt file, and when the "Connecting..." situation happens, nothing is written into the txt file.
When the connection from browser hangs, I have tried to ping the domain (dpi.vh.com, pi.vh.com) and telnet to the port (telnet dpi.vh.com 8080, telnet pi.vh.com 8080), and these all works.
Anyone knows what might be the reason?
(BTW, the sites are using Kohana 3.0... not sure if that's the cause) |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Tue 28 Jan '14 12:05 Post subject: |
|
|
You have in httpd.conf the following ?
AcceptFilter http none
AcceptFilter https none
EnableSendfile off
EnableMMAP off |
|
Back to top |
|
alan.lee
Joined: 28 Jan 2014 Posts: 4 Location: Hong Kong
|
Posted: Tue 28 Jan '14 12:27 Post subject: |
|
|
No.
I just added these lines and tested for a while... so far seems no problem |
|
Back to top |
|
|
|
|
|
|