Hello all!

I've developed an app under TG2 and have had a lot of trouble getting it 
deployed.  

Followed the docs to deploy from 
http://turbogears.readthedocs.io/en/latest/cookbook/deploy/mod_wsgi.html
 unsuccessfully.

It is being deployed under Apache2 with WSGI on a Ubuntu 16.04 64 bit 
server.  

Every time I try to access the app from the browser I get a *directory 
listing* instead of the running app. A new virtualbox image was created in 
case my real server was wonky, but it fails to run on that one too.

Been searching for a solution for hours but have not found one.  

The desire is to get to the app from the browser using the link: 
192.168.10.25:/dispatch




The default config for apache has not been changed:

<VirtualHost *:80>
 # The ServerName directive sets the request scheme, hostname and port that
 # the server uses to identify itself. This is used when creating
 # redirection URLs. In the context of virtual hosts, the ServerName
 # specifies what hostname must appear in the request's Host: header to
 # match this virtual host. For the default virtual host (this file) this
 # value is not decisive as it is used as a last resort host regardless.
 # However, you must set it for any further virtual host explicitly.
 #ServerName www.example.com


 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html


 # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
 # error, crit, alert, emerg.
 # It is also possible to configure the loglevel for particular
 # modules, e.g.
 #LogLevel info ssl:warn


 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined


 # For most configuration files from conf-available/, which are
 # enabled or disabled at a global level, it is possible to
 # include a line for only one particular virtual host. For example the
 # following line enables the CGI configuration for this host only
 # after it has been globally disabled with "a2disconf".
 #Include conf-available/serve-cgi-bin.conf
</VirtualHost>





The apache config for my app is:

<VirtualHost *>
    WSGIProcessGroup localhost 
    WSGIDaemonProcess localhost user=www-data group=www-data threads=4 
python-path=/var/tg2env/lib/python2.7/site-packages
    WSGIScriptAlias /dispatch /var/www/html/dispatch/app.wsgi


    #Serve static files directly without TurboGears
    Alias /images /var/www/html/dispatch/dispatch/public/images
    Alias /css /var/www/html/dispatch/dispatch/public/css
    Alias /js /var/www/html/dispatch/dispatch/public/js


    CustomLog /var/log/apache2/dispatch-access_log common
    ErrorLog /var/log/apache2/dispatch-error_log
DocumentRoot /var/www/html/dispatch
</VirtualHost>




app.wgsi:

APP_CONFIG = "/var/www/html/dispatch/production.ini"


#Setup logging
import logging.config
logging.config.fileConfig(APP_CONFIG)


#Load the application
from paste.deploy import loadapp
application = loadapp('config:%s' % APP_CONFIG)




The following mods are enabled:

access_compat alias auth_basic authn_core authn_file authz_core authz_host 
authz_user autoindex deflate dir env filter mime mpm_event negotiation 
setenvif status wsgi



One thing I noticed was production.ini was not created automatically like 
the docs says it is.  I copied the development.ini file and replace all the 
debug = true with debug = false.

Anyone have an idea of what I should try next?  

Thanks!
Mel

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to