apache2 not showing flask app on local server - flask

I was following this tutorial:
https://pythonprogramming.net/creating-first-flask-web-app/?completed=/flask-web-development-introduction/
On my local server (home machine on local network).
Flask itself starts properly
>>> python /var/www/FlaskApp/FlaskApp/__init__.py
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [31/Oct/2016 22:56:29] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [31/Oct/2016 22:56:29] "GET /favicon.ico HTTP/1.1" 404 -
flask starts
But Apache is showing its default webpage no matter what.
sudo a2enmod wsgi
Module wsgi already enabled
cat /var/www/FlaskApp/FlaskApp/init.py
from flask import Flask
app = Flask(__name__)
#app.route('/')
def homepage():
return "Hi There, how you're doin?"
if __name__ == "__main__":
app.run()(debug=True)
cat /etc/apache2/sites-available/FlaskApp.conf
<VirtualHost *>
ServerName dagzserv
ServerAdmin my#email.com
WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
<Directory /var/www/FlaskApp/FlaskApp/>
Require all granted
</Directory>
Alias /static /var/www/FlaskApp/FlaskApp/static
<Directory /var/www/FlaskApp/FlaskApp/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo a2ensite FlaskApp
Site FlaskApp already enabled
I have tried adding app.run(host='0.0.0.0', port=5000)
I do have /etc/hosts dagserv as my ip in localnetwork (10.0.1.xxx)
Also tried ServerName as localhost.
One thing i did not understood is how exactly Apache is finding that "FlaskApp.conf" but i assumed that it is scanning its config directory
(/etc/apache2/sites-available/FlaskApp.conf)
I am getting no errors in /var/logs/apache2
cat access.log
10.0.1.14 - - [31/Oct/2016:22:46:52 -0700] "GET / HTTP/1.1" 200 3524 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"
10.0.1.14 - - [31/Oct/2016:22:49:14 -0700] "GET / HTTP/1.1" 200 3524 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"
10.0.1.14 - - [31/Oct/2016:22:49:15 -0700] "GET / HTTP/1.1" 200 3523 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"
10.0.1.101 - - [31/Oct/2016:22:56:18 -0700] "GET /favicon.ico HTTP/1.1" 404 499 "-" "Mozilla/5.0 (X11; Ubuntu; Linux armv7l; rv:49.0) Gecko/20100101 Firefox/49.0"
cat error.log
[Mon Oct 31 22:45:47.288264 2016] [wsgi:warn] [pid 982] mod_wsgi: Compiled for Python/2.7.11.
[Mon Oct 31 22:45:47.288623 2016] [wsgi:warn] [pid 982] mod_wsgi: Runtime using Python/2.7.12.
[Mon Oct 31 22:45:47.314433 2016] [mpm_prefork:notice] [pid 982] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Mon Oct 31 22:45:47.314616 2016] [core:notice] [pid 982] AH00094: Command line: '/usr/sbin/apache2'
[Mon Oct 31 22:48:52.171206 2016] [mpm_prefork:notice] [pid 982] AH00169: caught SIGTERM, shutting down
[Mon Oct 31 22:48:53.766824 2016] [wsgi:warn] [pid 2360] mod_wsgi: Compiled for Python/2.7.11.
[Mon Oct 31 22:48:53.766940 2016] [wsgi:warn] [pid 2360] mod_wsgi: Runtime using Python/2.7.12.
[Mon Oct 31 22:48:53.775947 2016] [mpm_prefork:notice] [pid 2360] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Mon Oct 31 22:48:53.776083 2016] [core:notice] [pid 2360] AH00094: Command line: '/usr/sbin/apache2'

1. How Apache is finding that "FlaskApp.conf"
There one line in /etc/apache2/apache2.conf to include virtual host configurations:
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
Apache2 server will load apache2.conf and also include the virtual host configurations.
2. Why Apache is showing its default webpage no matter what.
If you access the server via IP address, Apache will return based on its default site configuration in /etc/sites-available/000-default.conf. So if you want to access your WSGI server via IP address, you should disable the Apache default site configuration first:
sudo a2dissite 000-default.conf
service apache2 restart

Related

wsgi with apache is not able to read piped installed python packages

i get this eror :
sudo service apache2 restart :
[Thu Apr 18 13:11:02.687353 2019] [mpm_event:notice] [pid 2135:tid 140232732096384] AH00491: caught SIGTERM, shutting down
[Thu Apr 18 13:11:03.694739 2019] [ssl:warn] [pid 2300:tid 139990910658432] AH01909: ip-*.*.*.*.ec2.internal:443:0 server certificate does NOT include an ID which matches the server name
[Thu Apr 18 13:11:03.702921 2019] [ssl:warn] [pid 2301:tid 139990910658432] AH01909: ip-*.*.*.*.ec2.internal:443:0 server certificate does NOT include an ID which matches the server name
[Thu Apr 18 13:11:03.703014 2019] [wsgi:warn] [pid 2301:tid 139990910658432] mod_wsgi: Compiled for Python/2.7.11.
[Thu Apr 18 13:11:03.703018 2019] [wsgi:warn] [pid 2301:tid 139990910658432] mod_wsgi: Runtime using Python/2.7.12.
then i entered the domain we site and got in /var/log/apache2/error.log:
[Thu Apr 18 13:11:03.703598 2019] [mpm_event:notice] [pid 2301:tid 139990910658432] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Thu Apr 18 13:11:03.703617 2019] [core:notice] [pid 2301:tid 139990910658432] AH00094: Command line: '/usr/sbin/apache2'
[Thu Apr 18 13:11:10.014862 2019] [wsgi:error] [pid 2304:tid 139990600201984] err : No module named boto
[Thu Apr 18 13:11:10.015214 2019] [wsgi:error] [pid 2304:tid 139990600201984] [client 81.218.184.134:30333] mod_wsgi (pid=2304): Target WSGI script '/home/ubuntu/path/to/my_project/src/my_project/wsgi.py' does not contain WSGI application 'application'.
i am working with ubuntu 16.0.4 apache2 and nod_wsgi on AWS EC2, start to get up project that is working (not a new project)
printing the Exception in my wsgi.py i get :
No module named boto from
try:
application = get_wsgi_application()
except Exception as e:
print "err : {}".format(e)
but i have boto install :
# pip freeze | grep boto
You are using pip version 8.1.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
boto==2.49.0
boto3==1.9.112
botocore==1.12.16
here are other files that i configured according to https://docs.djangoproject.com/en/2.2/topics/install/ :
# cat /etc/apache2/mods-enabled/wsgi.load
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
# cat /etc/apache2/mods-enabled/wsgi.conf
<IfModule mod_wsgi.c>
WSGIPassAuthorization on
WSGIScriptAlias / /home/ubuntu/path/to/wsgi.py
WSGIPythonPath /home/ubuntu/path/to/my_project
<VirtualHost *:80>
<Directory "/home/ubuntu/path/to//my_project/">
Require all granted
</Directory>
</VirtualHost>
..
</IfModule>
It looks like you could be missing the site-packages directory in your WSGIPythonPath directive. I usually define the python path as part of the WSGIDaemonProcess directive:
WSGIDaemonProcess example \
display-name=example \
processes=2 threads=20 \
maximum-requests=10000 \
umask=0002 \
python-path=${SRV}/www:${SRV}/src:${SRV}/venv/prod_142/lib/python2.7/site-packages \
python-eggs=${SRV}/.python-eggs
WSGIScriptAlias / ${SRV}/www/example/wsgi.py \
process-group=example \
application-group=%{GLOBAL}
You can see a more full-featured virtualhost definition in the readme at https://github.com/datakortet/dkbuild-apacheconf (I'm the author).
the issue was that not all the python packages was installed , after installed all missing packages the website worked

Apache2 + mod_wsgi + python 3.6 not responding

I'm deploying a Django app with python 3.6 and virtualenv in an Ubuntu 18.4 server. This is my apache config
<VirtualHost *:80>
ServerName myapp.com
Redirect / https://myapp.com/
</VirtualHost>
<VirtualHost *:443>
ServerName myapp.com
SSLEngine On
SSLCertificateFile "/etc/apache2/ssl/myapp.com.crt"
SSLCertificateKeyFile "/etc/apache2/ssl/myapp.comv.key"
SSLCertificateChainFile "/etc/apache2/ssl/myapp.com.crt"
SSLProxyEngine On
Alias /static/ /home/ubuntu/myapp/assets/
Alias /media/ /home/ubuntu/myapp/data/
<Directory /home/ubuntu/myapp/data>
Require all granted
</Directory>
<Directory /home/ubuntu/myapp/assets>
Require all granted
</Directory>
<Directory /home/ubuntu/myapp>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess myapp python-path=/home/ubuntu/myapp:/home/ubuntu/myapp/venv/lib/python3.6/site-packages
WSGIProcessGroup myapp
WSGIScriptAlias / /home/ubuntu/myapp/wsgi.py
</VirtualHost>
if I run mod_wsgi-express module-config I get
LoadModule wsgi_module "/home/ubuntu/myapp/venv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
WSGIPythonHome "/home/ubuntu/myapp/venv"
which is the virtualenv I want to use.
Nonetheless when I try to access myapp.com I get timedout and there is nothing in error.log or access.log
error.log
[Sun Sep 30 11:42:37.066273 2018] [core:notice] [pid 628:tid 140584565169088] AH00094: Command line: '/usr/sbin/apache2'
[Sun Sep 30 11:42:39.728096 2018] [mpm_event:notice] [pid 628:tid 140584565169088] AH00491: caught SIGTERM, shutting down
[Sun Sep 30 11:42:39.812550 2018] [mpm_event:notice] [pid 882:tid 140042546797504] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g mod_wsgi/4.6.4 Python/3.6 configured -- resuming normal operations
[Sun Sep 30 11:42:39.812642 2018] [core:notice] [pid 882:tid 140042546797504] AH00094: Command line: '/usr/sbin/apache2'
access.log
51.38.12.21 - - [30/Sep/2018:08:20:14 +0000] "GET / HTTP/1.1" 200 11192 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
37.135.181.196 - - [30/Sep/2018:10:40:24 +0000] "GET / HTTP/1.1" 200 3477 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
37.135.181.196 - - [30/Sep/2018:10:40:24 +0000] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3623 "http://3.120.98.140/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
37.135.181.196 - - [30/Sep/2018:10:40:25 +0000] "GET /favicon.ico HTTP/1.1" 404 503 "http://3.120.98.140/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
I tried adding WSGIApplicationGroup %{GLOBAL} to my apache config file but the result is the same.
What am I missing here?
Thanks in advance
Since no-one has attempted an answer and I've been trying to do the same thing (only on CentOS), for me it was SELinux.
If you have SELinux enabled (seems unlikely on Ubuntu), it might be denying read access to the wsgi file, though I'd expect your httpd error log and selinux audit log to show that. I had to change the context type:
$ ls -Z ~/myproject
drwxrwxr-x. admin admin unconfined_u:object_r:user_home_t:s0 myprojectenv
-rwxrw-r--. admin admin unconfined_u:object_r:user_home_t:s0 myproject.wsgi
$ chcon -t httpd_sys_content_t ~/myproject/myproject.wsgi
$ ls -Z ~/myproject/myproject.wsgi
-rwxrw-r--. admin admin unconfined_u:object_r:httpd_sys_content_t:s0 myproject.wsgi
I my case I also overlooked that my test project needed to define a function called 'application' instead of something else, and I renamed it to .wsgi from .py (though, I think that's just convention).
The mod_wsgi documentation's section on checking your installation was also quite helpful, specifically making sure I wasn't running a mod_wsgi compiled against a different version of python or something silly like that.
https://modwsgi.readthedocs.io/en/develop/user-guides/checking-your-installation.html

mod_wsgi apache2 loading failure

I've set this up using a multitude of documentation and repeatedly get the same result. This particular one below is following https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/#daemon-mode exactly as it says. I need help!
[Sun Oct 09 14:52:09.208810 2016] [wsgi:warn] [pid 53237] mod_wsgi: Compiled for Python/3.5.1+.
[Sun Oct 09 14:52:09.208844 2016] [wsgi:warn] [pid 53237] mod_wsgi: Runtime using Python/3.5.2.
[Sun Oct 09 14:52:09.210835 2016] [mpm_prefork:notice] [pid 53237] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations
[Sun Oct 09 14:52:09.210866 2016] [core:notice] [pid 53237] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 09 14:52:09.245977 2016] [wsgi:error] [pid 53240] mod_wsgi (pid=53240): Call to 'site.addsitedir()' failed for '(null)', stopping.
[Sun Oct 09 14:52:09.246021 2016] [wsgi:error] [pid 53240] mod_wsgi (pid=53240): Call to 'site.addsitedir()' failed for '/home/addohm/projects/rtservice/projectenv/lib/python2.7/site-packages'.
If You are trying to deploy Django web on EB with a single EC2 instance and want to configure SSL on that single EB instance instead of doing at ELB.
Step-1 Login to EC2 and do sudo yum install mod24_ssl.
Step-2 sudo vi /etc/httpd/conf.d/ssl.conf
Step-3 Paste below config
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /opt/python/run/venv
WSGISocketPrefix run/wsgi
WSGIRestrictEmbedded On
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile "/etc/pki/tls/certs/server.crt"
SSLCertificateKeyFile "/etc/pki/tls/certs/server.key"
Alias /static/ /opt/python/current/app/static/
<Directory /opt/python/current/app/static>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /opt/python/current/app/<yoursite>/wsgi.py
<Directory /opt/python/current/app>
Require all granted
</Directory>
WSGIDaemonProcess wsgi-ssl processes=1 threads=15 display-name=%{GROUP} \
python-home=/opt/python/run/venv/ \
python-path=/opt/python/current/app user=wsgi group=wsgi \
home=/opt/python/current/app
WSGIProcessGroup wsgi-ssl
Step-4
CERTIFICATE.crt > "/etc/pki/tls/certs/server.crt"
PRIVATE KEY.crt > "/etc/pki/tls/certs/server.key"
Step-5 Restart server
Try Https on your site, should be working fine.

Django app on EC2 ubuntu Static File issue

I have recently uploaded my app on EC2 server running Ubuntu, Python 2.7.3, django.VERSION 1.5.1. I have managed to successfully launch it without any CSS/Images or JS. I can view templates and navigate them means template directory settings are working.
Looks like I am missing some setting for static/media files.
Can anyone please advise?
Content of "cat /etc/apache2/httpd.conf"
WSGIScriptAlias / /home/ubuntu/site/ProjectName/ProjectName/wsgi.py
WSGIPythonPath /home/ubuntu/site/ProjectName
<Directory /home/ubuntu/site/ProjectName/ProjectName>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
Content of settings.py
MEDIA_ROOT = '/var/www/media/'
MEDIA_URL = ''
STATIC_ROOT = ''
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/var/www/static/admin/'
STATICFILES_DIRS = (
'/var/www/static',
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
TEMPLATE_DIRS = ('/var/www/templates',)
**$ ls -ltr /var/www**
total 16
-rw-r--r-- 1 root root 177 Jul 26 20:21 index.html
drwxr-xr-x 3 www-data root 4096 Jul 28 04:20 static
drwxr-xr-x 5 www-data root 4096 Jul 28 04:20 media
drwxr-xr-x 20 www-data root 4096 Jul 28 16:29 templates
Errors in apache2/access.log
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/bootstrap.css HTTP/1.1" 404 1798
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/jquery.fancybox.css HTTP/1.1" 404 1806
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/jquery.js HTTP/1.1" 404 1798
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/jquery.metadata.js HTTP/1.1" 404 1804
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/css/login.css HTTP/1.1" 404 1794
[29/Jul/2013:13:41:36 -0500] "GET /static/neatadmin/js/error.js HTTP/1.1" 404 1794
Errors in apache2/error.log (I dont think it's relevant but just FYI)
[Mon Jul 29 13:41:29 2013] [error] /usr/local/lib/python2.7/dist-packages/django/conf/init.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
[Mon Jul 29 13:41:29 2013] [error] DeprecationWarning)
[Mon Jul 29 13:41:29 2013] [error]
[Mon Jul 29 13:41:35 2013] [error] /usr/local/lib/python2.7/dist-packages/django/conf/init.py:221: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
[Mon Jul 29 13:41:35 2013] [error] DeprecationWarning)
[Mon Jul 29 13:41:35 2013] [error]
Your settings are confusing the purpose of STATICFILES_DIRS and STATIC_ROOT. STATICFILES_DIRS holds additional static resources that are global to your project. This mirrors the TEMPLATE_DIRS setting. This directory would be included in your source repository.
STATIC_ROOT is a collection point for serving static files in production. Files from all the installed apps and STATICFILES_DIRS are copied here when you run collectstatic. This does not need to be set for local development. This directory would not be included in the repo as it only contains generated content. Your webserver configuration should have an alias to serve STATIC_ROOT as STATIC_URL For an example using Apache you should see the docs https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/modwsgi/#serving-files

Error 503 in OpenShift server

That's my first Django project and I'm trying to deploy it to OpenShift, but I have a problem: when I'm trying to open app's page, I see "503: Service Temporarily Unavailable" message. I thought that app wasn't started so I tried to launch 'ctl_app start' in ssh and I've got this:
python: can't open file 'app.py': [Errno 2] No such file or directory
I tried to start app this way: rhc app start customerquiz and got this:
RESULT:
customerquiz started
But it took no effect. Well, I tried to look the state of app:
$ rhc app show --state customerquiz
Cartridge python-2.7, mysql-5.1, phpmyadmin-3.4 is started
And that's what in server logs:
$ rhc tail customerquiz
==> mysql-5.1/log/mysql_error.log <==
130519 17:32:54 [Note] /usr/libexec/mysqld: Shutdown complete
130519 17:32:54 mysqld_safe mysqld from pid file /var/lib/openshift/000005//mysql-5.1/pid/mysql.pid ended
130519 17:33:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/000005//mysql-5.1/data/
130519 17:33:04 InnoDB: Initializing buffer pool, size = 16.0M
130519 17:33:05 InnoDB: Completed initialization of buffer pool
130519 17:33:05 InnoDB: Started; log sequence number 0 44233
130519 17:33:05 [Note] Event Scheduler: Loaded 0 events
130519 17:33:05 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.69' socket: '/var/lib/openshift/000005//mysql-5.1/socket/mysql.sock' port: 3306 Source distribution
==> python-2.7/logs/appserver.log <==
python: can't open file 'app.py': [Errno 2] No such file or directory
==> phpmyadmin-3.4/logs/access_log-20130519-000000-EST <==
109.254.107.11 - - [19/May/2013:17:14:13 -0400] "GET /phpmyadmin/themes/pmahomme/img/error.ico HTTP/1.1" 200 5430 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/phpmyadmin.css.php?server=1&token=436aa&js_frame=right&nocache=5471357898" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
- - - [19/May/2013:17:14:13 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
109.254.107.11 - admin [19/May/2013:17:14:18 -0400] "GET /phpmyadmin/ HTTP/1.1" 200 2580 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:14:19 -0400] "GET /phpmyadmin/main.php?token=436aa HTTP/1.1" 200 35472 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - adminB [19/May/2013:17:14:21 -0400] "GET /phpmyadmin/version_check.php?&_nocache=1368998062197204658 HTTP/1.1" 200 44 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/main.php?token=436aa" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:14:19 -0400] "GET /phpmyadmin/navigation.php?token=436aa HTTP/1.1" 200 5029 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:49 -0400] "GET /phpmyadmin/ HTTP/1.1" 200 2580 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:50 -0400] "GET /phpmyadmin/navigation.php?token=436aa HTTP/1.1" 200 5029 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:50 -0400] "GET /phpmyadmin/main.php?token=436aa HTTP/1.1" 200 35472 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:52 -0400] "GET /phpmyadmin/version_check.php?&_nocache=1368998453881950766 HTTP/1.1" 200 44 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/main.php?token=8436aa" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
==> phpmyadmin-3.4/logs/error_log-20130519-000000-EST <==
[Sun May 19 17:12:56 2013] [notice] Digest: done
[Sun May 19 17:12:56 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
[Sun May 19 17:28:00 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c6,c356
[Sun May 19 17:28:00 2013] [notice] Digest: generating secret for digest authentication ...
[Sun May 19 17:28:00 2013] [notice] Digest: done
[
Sun May 19 17:28:00 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
[Sun May 19 17:33:17 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c6,c356
[Sun May 19 17:33:17 2013] [notice] Digest: generating secret for digest authentication ...
[Sun May 19 17:33:17 2013] [notice] Digest: done
[Sun May 19 17:33:17 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
Does anyone have any ideas what can be wrong?
P.S. That's deployed project source code, if you need it: https://github.com/uncleLem/CustomerQuiz (I just changed database connection parameters).
P.P.S. Oh, BTW, if I open https://customerquiz-unclelem.rhcloud.com/phpmyadmin/ directly, I can see phpMyAdmin page.
We are not using mod_wsgi with these new carts. 2.7 uses gevent and 3.3 uses WebOb
Take a look at how we set up the app.py in the 2.7 cart
https://github.com/openshift/openshift-community-cartridge-python-2.7/blob/master/template/app.py
and for 3.3
https://github.com/openshift/openshift-community-cartridge-python-3.3/blob/master/template/app.py
Can you review the following blog post to see if it helps?
https://www.openshift.com/blogs/host-python-in-a-community-cart