I did a fresh install of both apache and mod_wsgi yesterday. This is the
only virtual host enabled (above and beyond the default). Though I started
first with my flask app yesterday I disabled that site:
/etc/apache2/sites-enabled# ls -ltr
total 0
lrwxrwxrwx 1 root root 35 Sep 25 12:03 000-default.conf ->
../sites-available/000-default.conf
lrwxrwxrwx 1 root root 26 Sep 25 13:16 yo.conf -> ../sites-available/yo.conf
Do I need to disable the default site?
I would think not
/etc/apache2/sites-enabled# cat 000-default.conf
<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>
On Thursday, September 25, 2014 9:04:57 AM UTC-4, David Sargrad wrote:
>
> I am trying to follow the instructions for running the mod_wsgi hello
> world application:
> https://code.google.com/p/modwsgi/wiki/WhereToGetHelp
>
> I installed apache2 and libapache2-mod-wsgi
>
> sudo apt-get install apache2
> sudo apt-get install libapache2-mod-wsgi
>
>
> My wsgi hello world:
> /var/www/yo/public_html# cat yo.wsgi
> def application(environ, start_response):
> status = '200 OK'
> output = 'Yo World!'
>
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
>
> start_response(status, response_headers)
>
> return [output]
>
>
> My virtualhost:
> /etc/apache2/sites-available# cat yo.conf
> <VirtualHost *:80>
> ServerName yohost
> # WSGIDaemonProcess cwpmash user=ubuntu group=ubuntu threads=5
> WSGIScriptAlias /yo /var/www/yo/public_html/yo.wsgi
> DocumentRoot /var/www/yo/public_html
> <Directory /var/www/yo/public_html>
> # WSGIProcessGroup cwpmash
> # WSGIApplicationGroup %{GLOBAL}
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> I've enabled info logging in apache (rather than warn).
>
> I've enabled the site:
> /etc/apache2/sites-available# ls ../sites-enabled/
> 000-default.conf yo.conf
>
>
>
>
> My apache2 error log shows the following on apache restart:
>
> [Thu Sep 25 13:04:46.211520 2014] [:info] [pid 2305:tid 139868472567680]
> mod_wsgi (pid=2305): Destroying interpreters.
> [Thu Sep 25 13:04:46.211603 2014] [:info] [pid 2305:tid 139868472567680]
> mod_wsgi (pid=2305): Cleanup interpreter ''.
> [Thu Sep 25 13:04:46.211907 2014] [:info] [pid 2306:tid 139868472567680]
> mod_wsgi (pid=2306): Destroying interpreters.
> [Thu Sep 25 13:04:46.211976 2014] [:info] [pid 2306:tid 139868472567680]
> mod_wsgi (pid=2306): Cleanup interpreter ''.
> [Thu Sep 25 13:04:46.216683 2014] [:info] [pid 2305:tid 139868472567680]
> mod_wsgi (pid=2305): Terminating Python.
> [Thu Sep 25 13:04:46.217228 2014] [:info] [pid 2306:tid 139868472567680]
> mod_wsgi (pid=2306): Terminating Python.
> [Thu Sep 25 13:04:46.220709 2014] [:info] [pid 2305:tid 139868472567680]
> mod_wsgi (pid=2305): Python has shutdown.
> [Thu Sep 25 13:04:46.221243 2014] [:info] [pid 2306:tid 139868472567680]
> mod_wsgi (pid=2306): Python has shutdown.
> [Thu Sep 25 13:04:46.226124 2014] [core:info] [pid 2302:tid
> 139868472567680] AH00096: removed PID file /var/run/apache2/apache2.pid (
> pid=2302)
> [Thu Sep 25 13:04:46.226199 2014] [mpm_event:notice] [pid 2302:tid
> 139868472567680] AH00491: caught SIGTERM, shutting down
> [Thu Sep 25 13:04:47.348730 2014] [mpm_event:notice] [pid 2484:tid
> 140368719771520] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6
> configured -- resuming normal operations
> ...
--
You received this message because you are subscribed to the Google Groups
"modwsgi" 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 http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.