"OSError: [Errno 88] Socket operation on non-socket" by flipflop - apache

When trying to deploy an Flask application to my LAMP server, I got an error from flipflop, a FastCGI/WSGI gateway which enables my application to speak the FastCGI protocol.
~/minimal/run.py
from flask import Flask
from flipflop import WSGIServer
app = Flask(__name__)
#app.route('/')
def hello_world():
return 'hello, world'
if __name__ == '__main__':
WSGIServer(app).run()
Relevant part of the Apache configuration file, i.e. /etc/httpd/conf/httpd.conf:
<VirtualHost *:80>
ScriptAlias / /home/apps/minimal/run.py
ErrorLog /var/log/httpd/error_log
</VirtualHost>
Error report by Apache/2.2.15:
[apps#kernod0 ~]$ sudo head -n 20 /var/log/httpd/error_log
[sudo] password for apps:
[Wed Aug 16 16:39:16 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 16 16:39:16 2017] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 16 16:39:16 2017] [notice] Digest: done
[Wed Aug 16 16:39:16 2017] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 configured -- resuming normal operations
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] Traceback (most recent call last):
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] File "/home/apps/minimal/run.py", line 12, in <module>
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] WSGIServer(app).run()
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] File "/home/apps/minimal/flask/lib/python2.6/site-packages/flipflop.py", line 938, in run
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] sock.getpeername()
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] socket.error: [Errno 88] Socket operation on non-socket
[Wed Aug 16 16:39:16 2017] [error] [client 100.116.224.219] Premature end of script headers: run.py
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] Traceback (most recent call last):
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] File "/home/apps/minimal/run.py", line 12, in <module>
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] WSGIServer(app).run()
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] File "/home/apps/minimal/flask/lib/python2.6/site-packages/flipflop.py", line 938, in run
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] sock.getpeername()
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] socket.error: [Errno 88] Socket operation on non-socket
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.253] Premature end of script headers: run.py
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.205] Traceback (most recent call last):
[Wed Aug 16 16:39:17 2017] [error] [client 100.116.226.205] File "/home/apps/minimal/run.py", line 12, in <module>
In addition, even without using flipflop, it still doesn't work:
~/minimal/run.py
from flask import Flask
app = Flask(__name__)
#app.route('/')
def hello_world():
return 'hello, world'
if __name__ == '__main__':
app.run()
Error output:
[apps#kernod0 ~]$ sudo cat /var/log/httpd/error_log
[Wed Aug 16 20:47:24 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 16 20:47:24 2017] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 16 20:47:24 2017] [notice] Digest: done
[Wed Aug 16 20:47:24 2017] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 configured -- resuming normal operations
[Wed Aug 16 20:47:33 2017] [error] [client 100.116.226.182] * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] Traceback (most recent call last):
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/run.py", line 11, in <module>
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] app.run()
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/flask/lib/python2.6/site-packages/flask/app.py", line 841, in run
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] run_simple(host, port, self, **options)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/flask/lib/python2.6/site-packages/werkzeug/serving.py", line 739, in run_simple
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] inner()
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/flask/lib/python2.6/site-packages/werkzeug/serving.py", line 699, in inner
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] fd=fd)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/flask/lib/python2.6/site-packages/werkzeug/serving.py", line 593, in make_server
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] passthrough_errors, ssl_context, fd=fd)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/home/apps/minimal/flask/lib/python2.6/site-packages/werkzeug/serving.py", line 504, in __init__
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] HTTPServer.__init__(self, (host, int(port)), handler)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/usr/lib64/python2.6/SocketServer.py", line 412, in __init__
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] self.server_bind()
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/usr/lib64/python2.6/BaseHTTPServer.py", line 108, in server_bind
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] SocketServer.TCPServer.server_bind(self)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "/usr/lib64/python2.6/SocketServer.py", line 423, in server_bind
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] self.socket.bind(self.server_address)
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] File "<string>", line 1, in bind
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] socket
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] .
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] error
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] :
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] [Errno 98] Address already in use
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190]
[Wed Aug 16 20:47:37 2017] [error] [client 100.116.226.190] Premature end of script headers: run.py
[Wed Aug 16 20:48:33 2017] [warn] [client 100.116.226.182] Timeout waiting for output from CGI script /home/apps/minimal/run.py
[Wed Aug 16 20:48:33 2017] [error] [client 100.116.226.182] Script timed out before returning headers: run.py
[Wed Aug 16 20:49:33 2017] [warn] [client 100.116.226.182] Timeout waiting for output from CGI script /home/apps/minimal/run.py

I've managed to run your example, but there are some tweaking involved to make it work.
You might need to change paths on your system, because from your logs it seems that you're using system that runs python2.6 and older apache version which still uses httpd file.
If it is possible I would advise you to upgrade your environment.
Here is a step-by-step working solution:
1.Install virtualenvwrapper:
sudo -EH pip2 install virtualenvwrapper
2.Activte it:
source /usr/local/bin/virtualenvwrapper.sh
3.Create virtual env:
mkvirtualenv minimal
4.Install flask and flup:
pip install -U flask flup
flipflop is not working for me, but as it's README states
This module is a simplified fork of flup, written by Allan Saddi. It only has the FastCGI part of the original module.
so you can safely use it.
5.Install apache2:
sudo apt-get install apache2
6.Install libapache2-mod-fastcgi:
sudo apt-get install libapache2-mod-fastcgi
7.Create /var/www/minimal/run.py:
from flask import Flask
app = Flask(__name__)
#app.route('/')
def hello_world():
return 'hello, world'
8.Create /var/www/minimal/minimal.fcgi:
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
activate_this = '/home/some_user/.virtualenvs/minimal/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
sys.path.insert(0,"/var/www/minimal/")
from flup.server.fcgi import WSGIServer
from run import app
if __name__ == '__main__':
WSGIServer(app).run()
9.Make minimal.fcgi executable:
sudo chmod +x minimal.fcgi
10.Create minimal.conf file (in /etc/apache2/sites-available on my server):
FastCgiServer /var/www/minimal/minimal.fcgi -idle-timeout 300 -processes 5
<VirtualHost *:80>
ServerName YOUR_IP_ADDRESS
DocumentRoot /var/www/minimal/
AddHandler fastcgi-script fcgi
ScriptAlias / /var/www/minimal/minimal.fcgi/
<Location />
SetHandler fastcgi-script
</Location>
</VirtualHost>
11.Enable new site:
sudo a2ensite minimal.conf
12.Change /var/www/ ownership to www-data user:
sudo chown -R www-data:www-data /var/www/
13.Restart apache2:
sudo /etc/init.d/apache2 restart
And voila! :)
If you visit your server address you should see hello, world in your browser:
Also when restarting apache you can view FastCGI starting in apache's error.log:
[Thu Aug 24 16:33:09.354544 2017] [mpm_event:notice] [pid 17375:tid 139752788969344] AH00491: caught SIGTERM, shutting down
[Thu Aug 24 16:33:10.414829 2017] [mpm_event:notice] [pid 17548:tid 139700962228096] AH00489: Apache/2.4.18 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[Thu Aug 24 16:33:10.415033 2017] [core:notice] [pid 17548:tid 139700962228096] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 24 16:33:10.415651 2017] [:notice] [pid 17551:tid 139700962228096] FastCGI: process manager initialized (pid 17551)
[Thu Aug 24 16:33:10.416135 2017] [:warn] [pid 17551:tid 139700962228096] FastCGI: server "/var/www/minimal/minimal.fcgi" started (pid 17556)
[Thu Aug 24 16:33:11.416571 2017] [:warn] [pid 17551:tid 139700962228096] FastCGI: server "/var/www/minimal/minimal.fcgi" started (pid 17618)
[Thu Aug 24 16:33:12.422058 2017] [:warn] [pid 17551:tid 139700962228096] FastCGI: server "/var/www/minimal/minimal.fcgi" started (pid 17643)
[Thu Aug 24 16:33:13.422763 2017] [:warn] [pid 17551:tid 139700962228096] FastCGI: server "/var/www/minimal/minimal.fcgi" started (pid 17651)
[Thu Aug 24 16:33:14.423536 2017] [:warn] [pid 17551:tid 139700962228096] FastCGI: server "/var/www/minimal/minimal.fcgi" started (pid 17659)

You can't run the fastcgi script from the terminal. This script is supposed to be executed by Apache. Typically you have it configured in a ScriptAlias directive in your Apache config file.

In general you should use mod_fastcgi and configuration simillar to:
<VirtualHost *:8091>
ServerName helloworld.local
DocumentRoot /home/fe/work/flipflop
FastCgiServer /home/fe/work/flipflop/run.py
ScriptAlias / /home/fe/work/flipflop/run.py
<Location />
Options none
</Location>
</VirtualHost>
So it will make run your script as FastCgi, but I'm not familiar with flipflop and can't make it works.
But if you are not limited to flipflop you could use uwsgi to run your application, mod_wsgi to run it with Apache (read more details in Flask documentation) or use Flask-Script runserver command to run your application in debug server (see example in Flask-Script documentation

First things first, looks like you're having already some app running/listening on port 5000.
You might want to find which with sudo sockstat |grep 5000 and then configure Apache consequently, or kill the process/service using localhost:5000.
Second, looks like your virtual host is not taken into account/not fully configured.

Related

Invalid Content-Length and Client sent malformed Host header

I got this log from apache httpd log file
Can u help troubleshooting
Thanks
[Wed Apr 26 02:40:13 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/wa.exe
[Wed Apr 26 02:40:13 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/wa.exe
[Wed Apr 26 02:40:14 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/whois.cgi
[Wed Apr 26 02:40:14 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/whois.cgi
[Wed Apr 26 02:40:36 2017] [error] [client x.x.x.x] script '/var/www/cgi-bin/contact.php' not found or unable to stat
[Wed Apr 26 02:40:38 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/counter.exe
[Wed Apr 26 02:40:58 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/hosting
[Wed Apr 26 02:41:02 2017] [error] [client x.x.x.x] script '/var/www/cgi-bin/form.php' not found or unable to stat
[Wed Apr 26 02:41:05 2017] [error] [client x.x.x.x] script '/var/www/cgi-bin/comments.php' not found or unable to stat
[Wed Apr 26 02:41:08 2017] [error] [client x.x.x.x] script not found or unable to stat: /var/www/cgi-bin/projects_site
[Wed Apr 26 02:41:46 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:47 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:47 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:49 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:50 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:50 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:51 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:51 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:51 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:41:52 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:02 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:03 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:03 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:04 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:04 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:04 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:05 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:05 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:06 2017] [error] [client x.x.x.x] Invalid Content-Length
[Wed Apr 26 02:43:20 2017] [error] [client x.x.x.x] Client sent malformed Host header
[Wed Apr 26 02:43:20 2017] [error] [client x.x.x.x] Client sent malformed Host header
[Wed Apr 26 02:43:31 2017] [error] [client x.x.x.x] Client sent malformed Host header
[Wed Apr 26 02:43:31 2017] [error] [client x.x.x.x] Client sent malformed Host header
[Wed Apr 26 02:43:31 2017] [error] [client x.x.x.x] Client sent malformed Host header
what special configuration should I have for httpd
the x.x.x.x refers to our IP address so it is not an attack from outside.
No worries . Our security team was running scans that created this error.. I forget to check that : File does not exist: /var/www/error/nessus

RuntimeError: populate() isn't reentrant on CentOS 7 | django 1.9 | python3

Im deploying a django application on a intranet environment. I've already set up a testing server and everything is fine (after breaking my head fixing errors).
This time, im seting up the production server and after configuring everything, i got an error 500, here is the httpd/logs/error_log:
traceback
[Thu Oct 27 09:44:15.480662 2016] [:error] [pid 15250] [remote 10.105.40.106:200] mod_wsgi (pid=15250): Target WSGI script '/home/rortega/smce/smce/wsgi.py' cannot be loaded as Python module.
[Thu Oct 27 09:44:15.480706 2016] [:error] [pid 15250] [remote 10.105.40.106:200] mod_wsgi (pid=15250): Exception occurred processing WSGI script '/home/rortega/smce/smce/wsgi.py'.
[Thu Oct 27 09:44:15.480736 2016] [:error] [pid 15250] [remote 10.105.40.106:200] Traceback (most recent call last):
[Thu Oct 27 09:44:15.480764 2016] [:error] [pid 15250] [remote 10.105.40.106:200] File "/home/rortega/smce/smce/wsgi.py", line 16, in <module>
[Thu Oct 27 09:44:15.480805 2016] [:error] [pid 15250] [remote 10.105.40.106:200] application = get_wsgi_application()
[Thu Oct 27 09:44:15.480823 2016] [:error] [pid 15250] [remote 10.105.40.106:200] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Thu Oct 27 09:44:15.480852 2016] [:error] [pid 15250] [remote 10.105.40.106:200] django.setup()
[Thu Oct 27 09:44:15.480868 2016] [:error] [pid 15250] [remote 10.105.40.106:200] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
[Thu Oct 27 09:44:15.480892 2016] [:error] [pid 15250] [remote 10.105.40.106:200] apps.populate(settings.INSTALLED_APPS)
[Thu Oct 27 09:44:15.480908 2016] [:error] [pid 15250] [remote 10.105.40.106:200] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/apps/registry.py", line 78, in populate
[Thu Oct 27 09:44:15.480932 2016] [:error] [pid 15250] [remote 10.105.40.106:200] raise RuntimeError("populate() isn't reentrant")
[Thu Oct 27 09:44:15.480958 2016] [:error] [pid 15250] [remote 10.105.40.106:200] RuntimeError: populate() isn't reentrant
[Thu Oct 27 09:44:15.561544 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] mod_wsgi (pid=15250): Target WSGI script '/home/rortega/smce/smce/wsgi.py' cannot be loaded as Python module.
[Thu Oct 27 09:44:15.561571 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] mod_wsgi (pid=15250): Exception occurred processing WSGI script '/home/rortega/smce/smce/wsgi.py'.
[Thu Oct 27 09:44:15.561597 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] Traceback (most recent call last):
[Thu Oct 27 09:44:15.561623 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] File "/home/rortega/smce/smce/wsgi.py", line 16, in <module>
[Thu Oct 27 09:44:15.561658 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] application = get_wsgi_application()
[Thu Oct 27 09:44:15.561675 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Thu Oct 27 09:44:15.561703 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] django.setup()
[Thu Oct 27 09:44:15.561719 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
[Thu Oct 27 09:44:15.561743 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] apps.populate(settings.INSTALLED_APPS)
[Thu Oct 27 09:44:15.561774 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] File "/home/rortega/smce_env/lib/python3.5/site-packages/django/apps/registry.py", line 78, in populate
[Thu Oct 27 09:44:15.561800 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] raise RuntimeError("populate() isn't reentrant")
[Thu Oct 27 09:44:15.561824 2016] [:error] [pid 15250] [remote 10.105.40.106:54216] RuntimeError: populate() isn't reentrant
Another things i noticed before cheking funtionality:
When executing makemigrations, only one model file of my 4 apps made the migrations, like if there is only one app
python manage.py runserver without errors
RuntimeError: populate() isn't reentrant
In my experience this usually means there is an error in the Django project somewhere. It can be hard to locate. Also, don't forget to restart apache.
When executing makemigrations, only one model file of my 4 apps made the migrations, like if there is only one app
Try pointing makemigrations to the specific app:
python manage.py makemigrations appname
Don't forget to apply migrations afterward:
python manage.py migrate
For everyone getting this problem, it can be anything, like a wrong django configuration or something with de mod_wsgi.
in my case it was that i needed to build python 3 with the --enable-shared tag.
if this is also your case, you can follow this.

MAMP: Apache denying clients

I am using localtunnel.me to tunnel between local machine and a remote HTTPS server, it's not working for me. in error log I am getting following:
[Sun Apr 17 13:12:37 2016] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 13:12:46 2016] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/products/.DS_Store, referer: http://localhost/
[Sun Apr 17 13:29:37 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 13:29:37 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 13:29:51 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/products/.DS_Store, referer: https://gdntrdlhyv.localtunnel.me/
[Sun Apr 17 14:46:17 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 14:46:38 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/products/.DS_Store, referer: https://epvztmlgwo.localtunnel.me/
[Sun Apr 17 14:48:48 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 14:48:48 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 14:48:56 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/products/.DS_Store, referer: https://grosjejjos.localtunnel.me/
[Sun Apr 17 14:57:43 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
[Sun Apr 17 14:57:50 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/products/.DS_Store, referer: https://gpyzbdhwqk.localtunnel.me/
[Sun Apr 17 15:13:49 2016] [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
I am using Apache 2.2 version shipped with MAMP. I am not getting clue why is it and how it's finding .DS_Store files.

drupal site on working on apache

my apache2 error.log shows:
[Sun Nov 10 18:40:46 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with
Suhosin-Patch configured -- resuming normal operations
[Sun Nov 10 18:41:13 2013] [error] [client 127.0.0.1] File does not exist:
/home/vishal/Dropbox/sites/pw/js, referer: http://pw/
[Sun Nov 10 18:41:22 2013] [error] [client 127.0.0.1] File does not exist:
/home/vishal/Dropbox/sites/pw/node, referer: http://pw/
[Sun Nov 10 18:43:27 2013] [notice] caught SIGTERM, shutting down
[Sun Nov 10 18:43:28 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.8 with
Suhosin-Patch configured -- resuming normal operations
[Sun Nov 10 18:46:47 2013] [error] [client 127.0.0.1] File does not exist:
/home/vishal/Dropbox/sites/pw/js, referer: http://pw/
[Sun Nov 10 18:46:50 2013] [error] [client 127.0.0.1] File does not exist:
/home/vishal/Dropbox/sites/pw/user, referer: http://pw/
Here is my details of the default http://pastebin.com/sWFDN5Yr
the confusing thing is that other sites work but only the vhost for pw
gives error. The main page comes up however the inner pages does not come up.
Thank you,
Vishal
its most likely a problem with ur clean url.
type http://yoursite?q=user/login and see if ur login page comes up, if so its a issue with ur vhost entry is not set to allow redirect and clean urls

deploy issue on ckan 2.0 over apache2

I have the following problem after try to deploy ckan 2.0 over apache2.
here is the log from apache:
tail -f /var/log/apache2/demo.ckan.net.error.log
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] return context.create()
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] return self.object_type.invoke(self)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] return fix_call(context.object, context.global_conf, **context.local_conf)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] File "/home/ubuntu-ckan-last/pyenv/lib/python2.6/site-packages/paste/deploy/util.py", line 56, in fix_call
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] val = callable(*args, **kw)
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] File "/home/ubuntu-ckan-last/pyenv/src/ckan/ckan/config/middleware.py", line 104, in make_app
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] who_parser.parse(open(app_conf['who.config_file']))
[Tue Apr 02 10:34:34 2013] [error] [client 127.0.0.1] KeyError: 'who.config_file'
i followed the latest documentation on how to deploy a ckan 2.1a instance over apache or nginx...
thanks !
The error suggests it cannot find the who.config_file bit of your CKAN config file (e.g. std.ini):
[app:main]
...
who.config_file = %(here)s/who.ini
However this is the first point in the code which accesses this config file, so it suggests the something more fundamental is up with the config file.
Check your wsgi script file contains the correct path to your config file. The line looks like this:
config_file = '/usr/local/demo.ckan.net/pyenv/src/ckan/development.ini'