Redirect requests to Django application using Apache - php

I have an Apache web-server and a PHP application. It all works great. The httpd.conf file at this moment looks like so:
...
LoadModule wsgi_module modules/mod_wsgi.so
...
Listen 8080
DocumentRoot "c:/Apache242/htdocs"
<Directory "c:/Apache242/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
As you can see, I've already downloaded mod_wsgi.so and when I restart Apache it's all ok. So, when I go to localhost:8080, I see my PHP application running. Well done. Now, I have a second teene-weeny Django application. It's not even a full-blown application, because it's role will be to answer to one certain request from the same PHP application. Still, I will call it Django application. I run it like so:
C:\django\project> python manage.py runserver 127.0.0.1:8081
As you can see I run a non-production server, but it works good. When I go to 127.0.0.1:8081, I see the result returned from my index view:
def index(request):
return HttpResponse("Hello, world")
So, it's just a simple Hello world page and it works. Now what I want is to use Apache server, so that when I go to localhost:8080/django, I would see the very same Hello world page. I do not know how to implement this. Many solutions are based on virtual hosts, but I do not want to configure them (just because virtual hosts do not work in my situation). So if you have any suggestions, you are welcome. Thanks!
EDIT
I managed to create a virtual host for my PHP application. So, the httpd-vhosts.conf file looks like so:
Listen 8080
<VirtualHost *:8080>
DocumentRoot "c:/Apache242/htdocs"
<Directory c:/Apache242/htdocs>
Options Indexes FollowSymLinks
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
DirectoryIndex index.php
</VirtualHost>
Now I wonder, how I should configure it to redirect requests from localhost:8080/django to my Django application.
EDIT
It seems like I tried everything in the world. Now I've just tried to create one and only one virtual host just to service my Django project and I failed. Here are some prerequisites that I have:
Python 2.7.12, MSC 1500 32bit on win32.
Apache/2.4.23 (Win64), VC10
mod_wsgi-py27-VC9.so for Apache24-win64-VC10
And this is how my virtual host file looks like now:
Listen 8080
<VirtualHost *:8080>
DocumentRoot "C:/Apache242/htdocs/django"
ServerName localhost
WSGIScriptAlias / "C:/Apache242/htdocs/django/accent/wsgi.py"
<Directory "C:/Apache242/htdocs/django/accent">
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
When I reload Apache, I see it's all ok. Great. But when I go to localhost:8080, I get "Internal Server Error". And this is the whole stack trace from Apache error log:
[Fri Dec 02 14:02:33.340929 2016] [mpm_winnt:notice] [pid 8212:tid 300] AH00430: Parent: Child process 9532 exited successfully.
[Fri Dec 02 14:02:34.241980 2016] [wsgi:warn] [pid 4652:tid 300] mod_wsgi: Compiled for Python/2.7.9+.
[Fri Dec 02 14:02:34.242980 2016] [wsgi:warn] [pid 4652:tid 300] mod_wsgi: Runtime using Python/2.7.6.
[Fri Dec 02 14:02:34.242980 2016] [mpm_winnt:notice] [pid 4652:tid 300] AH00455: Apache/2.4.23 (Win64) mod_wsgi/4.4.6 Python/2.7.6 configured -- resuming normal operations
[Fri Dec 02 14:02:34.242980 2016] [mpm_winnt:notice] [pid 4652:tid 300] AH00456: Apache Lounge VC10 Server built: Jul 9 2016 11:59:00
[Fri Dec 02 14:02:34.242980 2016] [core:notice] [pid 4652:tid 300] AH00094: Command line: 'C:\\Apache242\\bin\\httpd.exe -d C:/Apache242'
[Fri Dec 02 14:02:34.245981 2016] [mpm_winnt:notice] [pid 4652:tid 300] AH00418: Parent: Created child process 10960
[Fri Dec 02 14:02:34.695006 2016] [wsgi:warn] [pid 10960:tid 172] mod_wsgi: Compiled for Python/2.7.9+.
[Fri Dec 02 14:02:34.696006 2016] [wsgi:warn] [pid 10960:tid 172] mod_wsgi: Runtime using Python/2.7.6.
[Fri Dec 02 14:02:34.753010 2016] [mpm_winnt:notice] [pid 10960:tid 172] AH00354: Child: Starting 64 worker threads.
[Fri Dec 02 14:02:54.295127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] mod_wsgi (pid=10960): Target WSGI script 'C:/Apache24/htdocs/django/accent/wsgi.py' cannot be loaded as Python module.
[Fri Dec 02 14:02:54.295127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] mod_wsgi (pid=10960): Exception occurred processing WSGI script 'C:/Apache24/htdocs/django/accent/wsgi.py'.
[Fri Dec 02 14:02:54.295127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] Traceback (most recent call last):
[Fri Dec 02 14:02:54.295127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:/Apache24/htdocs/django/accent/wsgi.py", line 13, in <module>
[Fri Dec 02 14:02:54.296127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django.core.wsgi import get_wsgi_application
[Fri Dec 02 14:02:54.296127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\core\\wsgi.py", line 2, in <module>
[Fri Dec 02 14:02:54.296127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django.core.handlers.wsgi import WSGIHandler
[Fri Dec 02 14:02:54.296127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\core\\handlers\\wsgi.py", line 11, in <module>
[Fri Dec 02 14:02:54.297127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django import http
[Fri Dec 02 14:02:54.297127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\http\\__init__.py", line 1, in <module>
[Fri Dec 02 14:02:54.297127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django.http.cookie import SimpleCookie, parse_cookie
[Fri Dec 02 14:02:54.297127 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\http\\cookie.py", line 3, in <module>
[Fri Dec 02 14:02:54.298128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django.utils.encoding import force_str
[Fri Dec 02 14:02:54.298128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\utils\\encoding.py", line 10, in <module>
[Fri Dec 02 14:02:54.298128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] from django.utils.six.moves.urllib.parse import quote
[Fri Dec 02 14:02:54.298128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\utils\\six.py", line 90, in __get__
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] result = self._resolve()
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\utils\\six.py", line 158, in _resolve
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] module = _import_module(self.mod)
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\lib\\site-packages\\django-1.7.11-py2.7.egg\\django\\utils\\six.py", line 80, in _import_module
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] __import__(name)
[Fri Dec 02 14:02:54.299128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\Lib\\urllib.py", line 26, in <module>
[Fri Dec 02 14:02:54.301128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] import socket
[Fri Dec 02 14:02:54.301128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] File "C:\\Python27\\Lib\\socket.py", line 47, in <module>
[Fri Dec 02 14:02:54.301128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] import _socket
[Fri Dec 02 14:02:54.301128 2016] [wsgi:error] [pid 10960:tid 752] [client ::1:54990] ImportError: DLL load failed: %1 \xed\xe5 \xff\xe2\xeb\xff\xe5\xf2\xf1\xff \xef\xf0\xe8\xeb\xee\xe6\xe5\xed\xe8\xe5\xec Win32.
I do not know what is wrong with that.
EDIT
This is what I have in settings.py:
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = ['localhost']
USE_X_FORWARDED_HOST = True
INTERNAL_IPS = ('127.0.0.1',)
EDIT
It seems like I tried dozens of virtual host configurations, but none of them works. This is the last configuration, that I tried:
Listen 8080
WSGIPythonPath C:/Apache242/htdocs/django
<VirtualHost *:8080>
DocumentRoot "C:/Apache242/htdocs/django"
ServerName localhost
WSGIScriptAlias / C:/Apache242/htdocs/django/accent/wsgi.py
<Directory C:/Apache242/htdocs/django/accent>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
LogLevel warn
</VirtualHost>
Apache restarts well, but when I go to localhost:8080, I still see the very same Internal Server Error. So, I guess my question now should be - does anybody use Apache with Django?
EDIT
Now I start to believe that it's all because of wsgi.py file. In my case it looks like:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "accent.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
But I do not know how to fix it. PS. I do not have virtual environment for Python, I just installed it globally.

You can try an htaccess file in root php directory, i'm not sure but you something like :
Options -Indexes
Options -Multiviews
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/django(.*)$ http://127.0.0.1:8081$1 [L,QSA]

Related

php-fpm show script instead of execute them

I'm installing sympa 6.2.42 on a ubuntu server 18.04 with php 7.2 and fpm and apache 2.4.29 (installed with official packages)
Sympa is installed from the source.
My virtual host under apache should normally run a fcgi script with fpm.
The problem is that my script is displayed in clear on my web page. The fcgi is therefore not executed, just displayed.
No errors in the logs (fpm/apache/syslog). The fpm/apache/sympa services runs normally.
I have change my script to a simple 'hello world', result is the same.
This is my virtual host:
<VirtualHost *:80>
Servername mycomputer.mydomain.com
Serveradmin step#mydomain.com
Documentroot /var/www/sympa.mydomain.com
<Location /sympa>
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://"
Options +ExecCGI
Require all granted
</Location>
<Location /static-sympa>
Require all granted
</Location>
alias /static-sympa /appli/sympa/static-content
ScriptAlias /sympa /appli/sympa/lib/sympa/cgi/wwsympa-wrapper.fcgi
RewriteEngine on
RewriteRule ^/$ /sympa [R,L]
</VirtualHost>
The output is the content of the wwsympa-wrapper.fcgi.
wwsympa-wrapper is not execute.
Update 1
My apache log:
[Thu May 23 08:41:53.760226 2019] [authz_core:debug] [pid 17536:tid 139860299998976] mod_authz_core.c(809): [client XX.XX.XX.X:53422] AH01626: authorization result of Require all granted: granted
[Thu May 23 08:41:53.760287 2019] [authz_core:debug] [pid 17536:tid 139860299998976] mod_authz_core.c(809): [client XX.XX.XX.X:53422] AH01626: authorization result of <RequireAny>: granted
[Thu May 23 08:41:53.760309 2019] [proxy:debug] [pid 17536:tid 139860299998976] mod_proxy.c(1228): [client XX.XX.XX.X:53422] AH01143: Running scheme unix handler (attempt 0)
[Thu May 23 08:41:53.760323 2019] [proxy_fcgi:debug] [pid 17536:tid 139860299998976] mod_proxy_fcgi.c(995): [client XX.XX.XX.X:53422] AH01076: url: fcgi:///appli/sympa/lib/sympa/cgi/wwsympa-wrapper.fcgi proxyname: (null) proxyport: 0
[Thu May 23 08:41:53.760331 2019] [proxy_fcgi:debug] [pid 17536:tid 139860299998976] mod_proxy_fcgi.c(1002): [client XX.XX.XX.X:53422] AH01078: serving URL fcgi:///appli/sympa/lib/sympa/cgi/wwsympa-wrapper.fcgi
[Thu May 23 08:41:53.760336 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2162): AH00942: FCGI: has acquired connection for (*)
[Thu May 23 08:41:53.760345 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2215): [client XX.XX.XX.X:53422] AH00944: connecting fcgi:///appli/sympa/lib/sympa/cgi/wwsympa-wrapper.fcgi to :8000
[Thu May 23 08:41:53.760349 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2252): [client XX.XX.XX.X:53422] AH02545: fcgi: has determined UDS as /var/run/php/php7.2-fpm.sock
[Thu May 23 08:41:53.760398 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2424): [client XX.XX.XX.X:53422] AH00947: connected /appli/sympa/lib/sympa/cgi/wwsympa-wrapper.fcgi to httpd-UDS:0
[Thu May 23 08:41:53.760432 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2795): AH02823: FCGI: connection established with Unix domain socket /var/run/php/php7.2-fpm.sock (*)
[Thu May 23 08:41:53.761132 2019] [proxy:debug] [pid 17536:tid 139860299998976] proxy_util.c(2177): AH00943: FCGI: has released connection for (*)
[Thu May 23 08:41:53.761265 2019] [deflate:debug] [pid 17536:tid 139860299998976] mod_deflate.c(853): [client XX.XX.XX.X:53422] AH01384: Zlib: Compressed 10632 to 3341 : URL /sympa
This is not php-fpm who is returning the script.
This behavior is generated because your configuration is wrong.
php-fpm work as a CGI gateway and you need to tell Apache to send .php file to it in order to be executed.
In your case, Apache does not know where to send this .php file and return simply the page as text.
I suggest to go here for install php-fpm properly with Apache
EDIT :
The configuration in Sympa documentation look like this :
<Location /sympa>
SetHandler "proxy:unix:$PIDDIR/wwsympa.socket|fcgi://"
Require all granted
</Location>
<Location /static-sympa>
Require all granted
</Location>

PHP websocket on SSL with proxy_wsTunnel - Apache

I have a php websocket server running but I want to connect to it via https. This is my JS: var conn = new WebSocket('wss://81.169.228.159:3671/wss2');
And this is my apache config:
ProxyPass /wss2/ ws://domain:3671/
I have proxy and proxy_wstunnel enabled.
So, what am I doing wrong?
ERROR LOG:
[Mon Mar 13 04:38:04.228450 2017] [mpm_prefork:notice] [pid 6683] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 04:38:04.228471 2017] [core:notice] [pid 6683] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 12:42:39.475641 2017] [:error] [pid 12432] [client 195.169.9.201:8546] script '/var/www/html/luukwuijster.io/phpinfo.php' not found or unable to stat
[Mon Mar 13 12:56:25.370986 2017] [mpm_prefork:notice] [pid 6683] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 12:56:26.539948 2017] [mpm_prefork:notice] [pid 26932] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 12:56:26.539972 2017] [core:notice] [pid 26932] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:06:36.280229 2017] [mpm_prefork:notice] [pid 26932] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:06:37.473220 2017] [mpm_prefork:notice] [pid 27256] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:06:37.473248 2017] [core:notice] [pid 27256] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:19:52.144983 2017] [mpm_prefork:notice] [pid 27256] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:19:53.235045 2017] [mpm_prefork:notice] [pid 27775] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:19:53.235083 2017] [core:notice] [pid 27775] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:22:21.467607 2017] [mpm_prefork:notice] [pid 27775] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:22:22.618416 2017] [mpm_prefork:notice] [pid 27911] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:22:22.618455 2017] [core:notice] [pid 27911] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:28:08.356148 2017] [mpm_prefork:notice] [pid 27911] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:28:09.546926 2017] [mpm_prefork:notice] [pid 28540] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:28:09.546964 2017] [core:notice] [pid 28540] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:35:26.856446 2017] [mpm_prefork:notice] [pid 28540] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:35:28.532498 2017] [mpm_prefork:notice] [pid 29153] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:35:28.532541 2017] [core:notice] [pid 29153] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:46:19.084561 2017] [ssl:error] [pid 29170] [client 208.93.152.93:54712] AH02042: rejecting client initiated renegotiation
[Mon Mar 13 13:57:14.410892 2017] [mpm_prefork:notice] [pid 29153] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:57:16.465381 2017] [mpm_prefork:notice] [pid 29927] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:57:16.465424 2017] [core:notice] [pid 29927] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 14:00:03.312882 2017] [:error] [pid 29936] [client 81.169.228.159:33706] PHP Notice: Undefined index: text in /var/www/html/luukwuijster.io/slack/cronofy/huiswerk.php on line 9
I assume that you have a React\Socket\Server listening on port 8080 (aka php push-server.php). The tutorial on the ratchet website should get you up to this point.
I also assume that you have already configured and loaded the proxy and proxy_wstunnel apache modules as mentioned in the question.
Below is the config I personally use to achieve a WebSocket connection.
I use /ws/ instead of the /wss2/ mentioned in the tutorial for a better looking URL. Feel free to adjust the config as necessary.
Apache Config
#SSL (Secure)
<VirtualHost *:443>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
SSLCertificateFile /etc/httpd/ssl/.crt
SSLCertificateKeyFile /etc/httpd/ssl/.key
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
#NON-SSL (Insecure)
<VirtualHost *:80>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
Secure JavaScript Socket Connection
var conn = new WebSocket('wss://local.sitename.com/ws/');
Insecure JavaScript Socket Connection
var conn = new WebSocket('ws://local.sitename.com/ws/');

Apache 2.4 + php-fpm - AH01071: Got error 'Primary script unknown\n' mod_proxy_balancer

I'm configuring an Apache 2.4.9 with php-fpm 5.5.9 in my Ubuntu 14.04. What I want is to make a balancer for the php-fpm requests but It throws the following error:
AH01071: Got error 'Primary script unknown\n'
When I try to access my php file. It seems that proxy balancer doesn't grab the document root passed by ProxyPassMatch to it. I'm using UDS to make apache access the php-fpm sockets instead of using network tcp.
If I configure it without balancer, everything works fine.
WORKS
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php5-fpm.sock1|fcgi://./var/www/html
NOT WORKS
ProxyPassMatch ^/(.*\.php(/.*)?)$ balancer://localhost/var/www/html
<Proxy balancer://localhost/>
BalancerMember unix:/var/run/php5-fpm.sock1|fcgi://localhost:9001
BalancerMember unix:/var/run/php5-fpm.sock2|fcgi://localhost:9002
BalancerMember unix:/var/run/php5-fpm.sock3|fcgi://localhost:9003
BalancerMember unix:/var/run/php5-fpm.sock4|fcgi://localhost:9004
</Proxy>
This is the balancer's config log:
[Sun Jun 15 12:32:30.839726 2014] [authz_core:debug] [pid 12217:tid 140330025703168] mod_authz_core.c(828): [client 10.1.1.2:52526] AH01628: authorization result: granted (no directives)
[Sun Jun 15 12:32:30.839899 2014] [lbmethod_byrequests:debug] [pid 12217:tid 140330025703168] mod_lbmethod_byrequests.c(97): AH01207: proxy: Entering byrequests for BALANCER (balancer://localhost)
[Sun Jun 15 12:32:30.839915 2014] [lbmethod_byrequests:debug] [pid 12217:tid 140330025703168] mod_lbmethod_byrequests.c(144): AH01208: proxy: byrequests selected worker "fcgi://localhost:9001" : busy 0 : lbstatus -3
[Sun Jun 15 12:32:30.839929 2014] [proxy_balancer:debug] [pid 12217:tid 140330025703168] mod_proxy_balancer.c(616): [client 10.1.1.2:52526] AH01172: balancer://localhost: worker (fcgi://localhost:9001) rewritten to fcgi://localhost:9001/var/www/html/info.php
[Sun Jun 15 12:32:30.839942 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(1761): AH00924: worker unix:/var/run/php5-fpm.sock1|fcgi://localhost:9001 shared already initialized
[Sun Jun 15 12:32:30.839958 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(1808): AH00927: initializing worker unix:/var/run/php5-fpm.sock1|fcgi://localhost:9001 local
[Sun Jun 15 12:32:30.840004 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(1843): AH00930: initialized pool in child 12217 for (localhost) min=0 max=25 smax=25
[Sun Jun 15 12:32:30.840018 2014] [proxy:debug] [pid 12217:tid 140330025703168] mod_proxy.c(1138): [client 10.1.1.2:52526] AH01143: Running scheme balancer handler (attempt 0)
[Sun Jun 15 12:32:30.840039 2014] [proxy_fcgi:debug] [pid 12217:tid 140330025703168] mod_proxy_fcgi.c(768): [client 10.1.1.2:52526] AH01076: url: fcgi://localhost:9001/var/www/html/info.php proxyname: (null) proxyport: 0
[Sun Jun 15 12:32:30.840058 2014] [proxy_fcgi:debug] [pid 12217:tid 140330025703168] mod_proxy_fcgi.c(775): [client 10.1.1.2:52526] AH01078: serving URL fcgi://localhost:9001/var/www/html/info.php
[Sun Jun 15 12:32:30.840090 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(2094): AH00942: FCGI: has acquired connection for (localhost)
[Sun Jun 15 12:32:30.840102 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(2108): AH02545: FCGI: has determined UDS as /var/run/php5-fpm.sock1
[Sun Jun 15 12:32:30.840115 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(2169): [client 10.1.1.2:52526] AH00944: connecting fcgi://localhost:9001/var/www/html/info.php to localhost:9001
[Sun Jun 15 12:32:30.840134 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(2304): [client 10.1.1.2:52526] AH00947: connected /var/www/html/info.php to localhost:9001
[Sun Jun 15 12:32:30.840272 2014] [authz_core:debug] [pid 12217:tid 140330025703168] mod_authz_core.c(828): [client 10.1.1.2:52526] AH01628: authorization result: granted (no directives)
[Sun Jun 15 12:32:30.842988 2014] [proxy_fcgi:error] [pid 12217:tid 140330025703168] [client 10.1.1.2:52526] AH01071: Got error 'Primary script unknown\n'
[Sun Jun 15 12:32:30.843095 2014] [proxy:debug] [pid 12217:tid 140330025703168] proxy_util.c(2132): AH00943: FCGI: has released connection for (localhost)
[Sun Jun 15 12:32:30.843134 2014] [proxy_balancer:debug] [pid 12217:tid 140330025703168] mod_proxy_balancer.c(670): [client 10.1.1.2:52526] AH01176: proxy_balancer_post_request for (balancer://localhost)
[Sun Jun 15 12:32:30.978315 2014] [authz_core:debug] [pid 12217:tid 140330017310464] mod_authz_core.c(802): [client 10.1.1.2:52526] AH01626: authorization result of Require all granted: granted
[Sun Jun 15 12:32:30.978346 2014] [authz_core:debug] [pid 12217:tid 140330017310464] mod_authz_core.c(802): [client 10.1.1.2:52526] AH01626: authorization result of <RequireAny>: granted
[Sun Jun 15 12:32:30.978387 2014] [core:info] [pid 12217:tid 140330017310464] [client 10.1.1.2:52526] AH00128: File does not exist: /var/www/html/favicon.ico
tcpdump can be helpful in this case.
tcpdump port 9001 -A | strings
It will show you where apache try to find your primary file

how to fix this error? im using php

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin#example.com to inform them of the time this error occurred, and the actions you performed just before this error
.
More information about this error may be available in the server error log.
error_log:
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:09:22.142866 2013] [mpm_winnt:notice] [pid 14156:tid 408] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Tue Dec 03 17:09:22.142866 2013] [mpm_winnt:notice] [pid 14156:tid 408] AH00456: Server built: Feb 22 2013 22:08:37
[Tue Dec 03 17:09:22.142866 2013] [core:notice] [pid 14156:tid 408] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Tue Dec 03 17:09:22.144866 2013] [mpm_winnt:notice] [pid 14156:tid 408] AH00418: Parent: Created child process 14052
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:09:22.809904 2013] [mpm_winnt:notice] [pid 14052:tid 300] AH00354: Child: Starting 150 worker threads.
[Tue Dec 03 17:11:22.260736 2013] [core:alert] [pid 14052:tid 1552] [client 127.0.0.1:52157] C:/wamp/www/nmb48/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Tue Dec 03 17:11:28.206076 2013] [mpm_winnt:notice] [pid 14156:tid 408] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Tue Dec 03 17:11:30.214191 2013] [mpm_winnt:notice] [pid 14052:tid 300] AH00364: Child: All worker threads have exited.
[Tue Dec 03 17:11:30.236192 2013] [mpm_winnt:notice] [pid 14156:tid 408] AH00430: Parent: Child process 14052 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:11:31.524266 2013] [mpm_winnt:notice] [pid 10180:tid 408] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Tue Dec 03 17:11:31.525266 2013] [mpm_winnt:notice] [pid 10180:tid 408] AH00456: Server built: Feb 22 2013 22:08:37
[Tue Dec 03 17:11:31.525266 2013] [core:notice] [pid 10180:tid 408] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Tue Dec 03 17:11:31.526266 2013] [mpm_winnt:notice] [pid 10180:tid 408] AH00418: Parent: Created child process 7664
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:11:32.229306 2013] [mpm_winnt:notice] [pid 7664:tid 300] AH00354: Child: Starting 150 worker threads.
[Tue Dec 03 17:12:19.407005 2013] [mpm_winnt:notice] [pid 10180:tid 408] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Tue Dec 03 17:12:21.411119 2013] [mpm_winnt:notice] [pid 7664:tid 300] AH00364: Child: All worker threads have exited.
[Tue Dec 03 17:12:21.434121 2013] [mpm_winnt:notice] [pid 10180:tid 408] AH00430: Parent: Child process 7664 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:12:23.036212 2013] [mpm_winnt:notice] [pid 904:tid 408] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Tue Dec 03 17:12:23.036212 2013] [mpm_winnt:notice] [pid 904:tid 408] AH00456: Server built: Feb 22 2013 22:08:37
[Tue Dec 03 17:12:23.036212 2013] [core:notice] [pid 904:tid 408] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Tue Dec 03 17:12:23.037212 2013] [mpm_winnt:notice] [pid 904:tid 408] AH00418: Parent: Created child process 9288
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:12:23.732252 2013] [mpm_winnt:notice] [pid 9288:tid 300] AH00354: Child: Starting 150 worker threads.
[Tue Dec 03 17:15:00.675229 2013] [mpm_winnt:notice] [pid 904:tid 408] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Tue Dec 03 17:15:02.683344 2013] [mpm_winnt:notice] [pid 9288:tid 300] AH00364: Child: All worker threads have exited.
[Tue Dec 03 17:15:02.706345 2013] [mpm_winnt:notice] [pid 904:tid 408] AH00430: Parent: Child process 9288 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:15:04.385441 2013] [mpm_winnt:notice] [pid 4544:tid 408] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Tue Dec 03 17:15:04.385441 2013] [mpm_winnt:notice] [pid 4544:tid 408] AH00456: Server built: Feb 22 2013 22:08:37
[Tue Dec 03 17:15:04.385441 2013] [core:notice] [pid 4544:tid 408] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Tue Dec 03 17:15:04.386441 2013] [mpm_winnt:notice] [pid 4544:tid 408] AH00418: Parent: Created child process 11524
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Tue Dec 03 17:15:05.087481 2013] [mpm_winnt:notice] [pid 11524:tid 300] AH00354: Child: Starting 150 worker threads.
[Tue Dec 03 17:21:07.324200 2013] [mpm_winnt:notice] [pid 4544:tid 408] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Tue Dec 03 17:21:09.328314 2013] [mpm_winnt:notice] [pid 11524:tid 300] AH00364: Child: All worker threads have exited.
[Tue Dec 03 17:21:09.351316 2013] [mpm_winnt:notice] [pid 4544:tid 408] AH00430: Parent: Child process 11524 exited successfully.
You haven't given enough information for people to be able to reply to "how to fix this error?".
It could be all manner of things, and without info it's impossible to tell.
Did the issue start after you uploaded a file? Perhaps a new .php file, or .htaccess file?
These (and other) file types can cause a server problem, so check what you last uploaded (if anything) and upload a previous version, or better yet back up files you recently added (if any) and remove them from the server, and see if the error goes away.
You need to examine the log files more closely. Read through and see if you can see anything that looks serious, paste the log entry details into Stack Overflow search (and Google) and see if others have details about it.
You should typically be looking in /var/log/apache2/error.log, but depends on what the config is set to.

Apache 2.4.4 WAMP VHosts error

I had created two VirtualHosts earlier namely [localhost] and "phpsite". Yesterday I renamed "phpsite" as "phppages" and added one more virtual host named "techsupport.com". I use port 8088 on my Apache server. But now I am able to use [localhost]:8088 and phpsite:8088 though there's no virtual host named "phpsite" and if I go for techsupport.com:8088 I get nothing.
Here's my vhost content:
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
#<VirtualHost *:80>
# ServerAdmin webmaster#dummy-host.example.com
# DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
# ServerName dummy-host.example.com
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error.log"
# CustomLog "logs/dummy-host.example.com-access.log" common
#</VirtualHost>
#<VirtualHost *:80>
# ServerAdmin webmaster#dummy-host2.example.com
# DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
# ServerName dummy-host2.example.com
# ErrorLog "logs/dummy-host2.example.com-error.log"
# CustomLog "logs/dummy-host2.example.com-access.log" common
#</VirtualHost>
<VirtualHost *:8088>
ServerAdmin admin#example.com
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias www.localhost.com
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "c:/wamp/www">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
</Directory>
</VirtualHost>
<VirtualHost *:8088>
DocumentRoot "e:/techsupport"
ServerName techsupport.com
ServerAlias www.techsupport.com
ErrorLog "logs/techsupport-error.log"
CustomLog "logs/techsupport-access.log" common
<Directory "e:/TechSupport">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
</Directory>
</VirtualHost>
<VirtualHost *:8088>
DocumentRoot "e:/phppages"
ServerName phppages
ServerAlias www.phppages.com
ErrorLog "logs/phppages-error.log"
CustomLog "logs/phppages-access.log" common
<Directory "e:/PHPPages">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
</Directory>
</VirtualHost>
Apache's error log shows this:
[Sun Aug 25 12:50:06.646882 2013] [mpm_winnt:notice] [pid 7936:tid 500] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 12:50:06.646882 2013] [mpm_winnt:notice] [pid 7936:tid 500] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 12:50:06.646882 2013] [core:notice] [pid 7936:tid 500] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 12:50:06.647883 2013] [mpm_winnt:notice] [pid 7936:tid 500] AH00418: Parent: Created child process 912
[Sun Aug 25 12:50:07.216263 2013] [mpm_winnt:notice] [pid 912:tid 384] AH00354: Child: Starting 150 worker threads.
[Sun Aug 25 12:51:15.409867 2013] [mpm_winnt:notice] [pid 7936:tid 500] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 25 12:51:17.411205 2013] [mpm_winnt:notice] [pid 912:tid 384] AH00364: Child: All worker threads have exited.
[Sun Aug 25 12:51:17.433218 2013] [mpm_winnt:notice] [pid 7936:tid 500] AH00430: Parent: Child process 912 exited successfully.
[Sun Aug 25 12:51:30.206760 2013] [mpm_winnt:notice] [pid 11396:tid 204] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 12:51:30.207763 2013] [mpm_winnt:notice] [pid 11396:tid 204] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 12:51:30.207763 2013] [core:notice] [pid 11396:tid 204] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 12:51:30.208763 2013] [mpm_winnt:notice] [pid 11396:tid 204] AH00418: Parent: Created child process 4808
[Sun Aug 25 12:51:30.670070 2013] [mpm_winnt:notice] [pid 4808:tid 384] AH00354: Child: Starting 150 worker threads.
[Sun Aug 25 13:25:30.406049 2013] [mpm_winnt:notice] [pid 11396:tid 204] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 25 13:25:32.406924 2013] [mpm_winnt:notice] [pid 4808:tid 384] AH00364: Child: All worker threads have exited.
[Sun Aug 25 13:25:32.423935 2013] [mpm_winnt:notice] [pid 11396:tid 204] AH00430: Parent: Child process 4808 exited successfully.
[Sun Aug 25 13:28:38.706114 2013] [mpm_winnt:notice] [pid 10328:tid 516] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 13:28:38.706114 2013] [mpm_winnt:notice] [pid 10328:tid 516] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 13:28:38.706114 2013] [core:notice] [pid 10328:tid 516] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 13:28:38.708114 2013] [mpm_winnt:notice] [pid 10328:tid 516] AH00418: Parent: Created child process 4716
[Sun Aug 25 13:28:39.170423 2013] [mpm_winnt:notice] [pid 4716:tid 380] AH00354: Child: Starting 150 worker threads.
[Sun Aug 25 13:33:14.347584 2013] [mpm_winnt:notice] [pid 10328:tid 516] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 25 13:33:16.349839 2013] [mpm_winnt:notice] [pid 4716:tid 380] AH00364: Child: All worker threads have exited.
[Sun Aug 25 13:33:16.369232 2013] [mpm_winnt:notice] [pid 10328:tid 516] AH00430: Parent: Child process 4716 exited successfully.
[Sun Aug 25 13:33:18.445939 2013] [mpm_winnt:notice] [pid 7048:tid 464] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 13:33:18.445939 2013] [mpm_winnt:notice] [pid 7048:tid 464] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 13:33:18.445939 2013] [core:notice] [pid 7048:tid 464] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 13:33:18.446940 2013] [mpm_winnt:notice] [pid 7048:tid 464] AH00418: Parent: Created child process 2556
[Sun Aug 25 13:33:18.801179 2013] [mpm_winnt:notice] [pid 2556:tid 324] AH00354: Child: Starting 150 worker threads.
[Sun Aug 25 13:35:23.175992 2013] [mpm_winnt:notice] [pid 7048:tid 464] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 25 13:35:25.178255 2013] [mpm_winnt:notice] [pid 2556:tid 324] AH00364: Child: All worker threads have exited.
[Sun Aug 25 13:35:25.197268 2013] [mpm_winnt:notice] [pid 7048:tid 464] AH00430: Parent: Child process 2556 exited successfully.
[Sun Aug 25 13:35:28.224795 2013] [mpm_winnt:notice] [pid 10616:tid 504] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 13:35:28.224795 2013] [mpm_winnt:notice] [pid 10616:tid 504] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 13:35:28.224795 2013] [core:notice] [pid 10616:tid 504] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 13:35:28.225792 2013] [mpm_winnt:notice] [pid 10616:tid 504] AH00418: Parent: Created child process 4012
[Sun Aug 25 13:35:28.599042 2013] [mpm_winnt:notice] [pid 4012:tid 324] AH00354: Child: Starting 150 worker threads.
[Sun Aug 25 13:43:03.326392 2013] [mpm_winnt:notice] [pid 10616:tid 504] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 25 13:43:07.389104 2013] [mpm_winnt:notice] [pid 4012:tid 324] AH00364: Child: All worker threads have exited.
[Sun Aug 25 13:43:07.404736 2013] [mpm_winnt:notice] [pid 10616:tid 504] AH00430: Parent: Child process 4012 exited successfully.
[Sun Aug 25 13:45:26.908312 2013] [mpm_winnt:notice] [pid 4788:tid 504] AH00455: Apache/2.4.4 (Win64) PHP/5.4.12 configured -- resuming normal operations
[Sun Aug 25 13:45:26.970818 2013] [mpm_winnt:notice] [pid 4788:tid 504] AH00456: Server built: Feb 22 2013 22:08:37
[Sun Aug 25 13:45:26.970818 2013] [core:notice] [pid 4788:tid 504] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Aug 25 13:45:26.970818 2013] [mpm_winnt:notice] [pid 4788:tid 504] AH00418: Parent: Created child process 5084
[Sun Aug 25 13:45:27.517719 2013] [mpm_winnt:notice] [pid 5084:tid 384] AH00354: Child: Starting 150 worker threads.
In httpd.cnf file:
Listen 0.0.0.0:8088
(Earlier it was just Listen 8088)
And
Include conf/extra/httpd-vhosts.conf
is uncommented as it should be.
I am helpless right now and have already spent 2 days on it. Please help.
Thanks
I had created two VirtualHosts earlier namely [localhost] and "phpsite". Yesterday I renamed "phpsite" as "phppages" and added one more virtual host named "techsupport.com". I use port 8088 on my Apache server. But now I am able to use [localhost]:8088 and phpsite:8088 though there's no virtual host named "phpsite" and if I go for techsupport.com:8088 I get nothing.
The only reason that "phppages" is not working and "phpsite" is working could be because you have a DNS entry or an entry in the host file for "phpsite" and not for "phppages". To debug this I would start by pinging them.
ping phppages
ping phpsite
While we're at the name resolution topic, your techsupport.com:8088 is not going to work because techsupport.com gets resolved to external site. If they don't have port 8088 open to the public, you simply won't be able to navigate to that site on that port. However, if they did then you would have been able to browse their pages not yours.
I'm not sure how WAMP manages host names, but the first thing to check is your DNS Server if you have one, otherwise check C:\Windows\System32\drivers\etc\hosts.
To make phppages work add the following lines to your C:\Windows\System32\drivers\etc\hosts:
127.0.0.1 phppages www.phppages.com
# Similarly for techsupport.com and www.techsupport.com
127.0.0.1 techsupport.com www.techsupport.com
After this your phppages and techsupport urls should work.
Caution: Adding public URLs to your hosts file might cause confusions in future when/if you removed that virtual host from httpd-vhosts.conf and forget to remove corresponding host name from the host file, in which case these public URLs will not be reachable to the correct destination. So, it is not recommended to use public host names for your virtual hosts.
Hope this helps.

Categories