Put some garbage in the configuration to trigged a syntax error. That is, 
literally put in:

    Xasdkfgjhaksdjhfaksdjh

If the config is actually be included and use, Apache shouldn't start up.

Graham

> On 9 Dec 2017, at 1:36 am, Jeff Robertson <[email protected]> wrote:
> 
> I'm still having some trouble with this setup...
> 
> I am now seeing wsgi_module loaded in Apache
> # httpd -M | grep wsgi
>  wsgi_module (shared)
> 
> But the 'WSGIScriptAlias' statement does not seem to be taking effect.  The 
> virtualhost portion of my httpd.conf looks like this... (I replaced just the 
> domain portion with 'example'). As a reminder, I'm still having to use this 
> interface in WHM that dynamically builds the httpd.conf file; and then 
> 'includes' adjustments based on the interface... So the below is not the 
> entirety of the virtualhost statement for this domain, it is an include 
> statement that adjusts the httpd.conf. 
> <VirtualHost *:80>
> 
>     ServerName www.example.com
>     ServerAlias example.com mail.example.com
>     ServerAdmin [email protected]
> 
>     DocumentRoot /home/example/public_html
> 
>     <Directory /home/example/public_html>
>     Order allow,deny
>     Allow from all
>     </Directory>
> 
>     WSGIScriptAlias / "/home/example/public_html/wsgi-scripts/myapp.wsgi"
> 
>     <Directory /home/example/public_html/wsgi-scripts>
>     Order allow,deny
>     Allow from all
>     </Directory>
> 
> </VirtualHost>
> 
> I ran '# httpd -S' and see the include statement mentioning *:80 is getting 
> picked up in httpd:
> # httpd -S
> ...
> *:80                   www.example.com 
> (/etc/apache2/conf.d/includes/pre_virtualhost_global.conf:4)
> ...
> 
> 
> 
> When I attempt to visit www.example.com, I get an 'Index of /' with a list of 
> '/home/example/public_html' instead of 
> "/home/example/public_html/wsgi-scripts/myapp.wsgi"
> 
> Any ideas about why this would be happening? Are there any commands I can run 
> and show that would help diagnose?  It seems the mod_wsgi is loaded; that the 
> WSGIScriptAlias is being included; yet the alias is not pointing to my 
> application.
> 
> 
> 
> 
> On Wednesday, December 6, 2017 at 5:03:01 PM UTC-5, Jeff Robertson wrote:
> Trying to work through the installation of mod_wsgi ...
> 
> It seems that I'm having trouble getting Apache to load the module.
> 
> Some background details:
> 
> # httpd -V
> Server version: Apache/2.4.29 (cPanel)
> Server built:   Nov 28 2017 15:27:38
> Server's Module Magic Number: 20120211:68
> Server loaded:  APR 1.5.2, APR-UTIL 1.5.2
> Compiled using: APR 1.5.2, APR-UTIL 1.5.2
> Architecture:   64-bit
> Server MPM:
> Server compiled with....
>  -D APR_HAS_SENDFILE
>  -D APR_HAS_MMAP
>  -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
>  -D APR_USE_SYSVSEM_SERIALIZE
>  -D APR_USE_PTHREAD_SERIALIZE
>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>  -D APR_HAS_OTHER_CHILD
>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>  -D DYNAMIC_MODULE_LIMIT=256
>  -D HTTPD_ROOT="/etc/apache2"
>  -D SUEXEC_BIN="/usr/sbin/suexec"
>  -D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_ERRORLOG="logs/error_log"
>  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
>  -D SERVER_CONFIG_FILE="conf/httpd.conf"
> 
> 
> 
> 
> # httpd -l
> Compiled in modules:
>   core.c
>   mod_so.c
>   http_core.c
> 
> 
> 
> # httpd -M
> Loaded Modules:
>  core_module (static)
>  so_module (static)
>  http_module (static)
>  mpm_worker_module (shared)
>  cgid_module (shared)
>  access_compat_module (shared)
>  actions_module (shared)
>  alias_module (shared)
>  asis_module (shared)
>  auth_basic_module (shared)
>  authn_core_module (shared)
>  authn_file_module (shared)
>  authz_core_module (shared)
>  authz_groupfile_module (shared)
>  authz_host_module (shared)
>  authz_user_module (shared)
>  autoindex_module (shared)
>  cache_module (shared)
>  dav_module (shared)
>  dav_fs_module (shared)
>  dbd_module (shared)
>  deflate_module (shared)
>  dir_module (shared)
>  env_module (shared)
>  expires_module (shared)
>  filter_module (shared)
>  headers_module (shared)
>  include_module (shared)
>  log_config_module (shared)
>  logio_module (shared)
>  mime_module (shared)
>  negotiation_module (shared)
>  proxy_module (shared)
>  proxy_fcgi_module (shared)
>  proxy_http_module (shared)
>  proxy_wstunnel_module (shared)
>  reqtimeout_module (shared)
>  rewrite_module (shared)
>  setenvif_module (shared)
>  slotmem_shm_module (shared)
>  socache_dbm_module (shared)
>  socache_shmcb_module (shared)
>  speling_module (shared)
>  status_module (shared)
>  suexec_module (shared)
>  unique_id_module (shared)
>  unixd_module (shared)
>  userdir_module (shared)
>  version_module (shared)
>  ssl_module (shared)
>  bwlimited_module (shared)
>  security2_module (shared)
>  suphp_module (shared)
> 
> 
> 
> # mod_wsgi-express module-config
> LoadModule wsgi_module 
> "/home/varilead/mydjango/lib/python3.6/site-packages/mod_wsgi-4.5.22-py3.6-linux-x86_64.egg/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
>  <http://mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so/>"
> WSGIPythonHome "/home/varilead/mydjango"
> 
> 
> 
> Apache configuration statement (I'm using WHM and it is making me use Include 
> Editor to configure httpd.conf -- this statement goes into the "Pre Main 
> Include" interface.)
> 
> LoadModule wsgi_module 
> "/home/varilead/mydjango/lib/python3.6/site-packages/mod_wsgi-4.5.22-py3.6-linux-x86_64.egg/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
>  <http://mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so/>"
> WSGIPythonHome "/home/varilead/mydjango"
> 
> I have saved the configuration above and restarted Apache; I don't get any 
> Apache errors at the restart.
> 
> **Another background datapoint: I have python 2.7 loaded by default on my 
> server; but I have python 3.6 loaded as well, and will be wanting to use that 
> as a virtualenv when I run my project. Is there potentially come conflict 
> with that scenaio? Are there other datapoints I can share that will help 
> diagnose?
> 
> # ldd mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so 
> <http://mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so/>
>         linux-vdso.so.1 =>  (0x00007ffe20e00000)
>         libpython3.6m.so.1.0 => /usr/local/lib/libpython3.6m.so.1.0 
> (0x00007f21236d8000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f21234b8000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f2123120000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007f2122f18000)
>         libutil.so.1 => /lib64/libutil.so.1 (0x00007f2122d10000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007f2122b08000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007f2122880000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f2123e28000)
> 
> 
> When I re-run "httpd - m", I don't see wsgi_module in the list.  What other 
> indications should I be looking for to know if mod_wsgi was successfully 
> loaded?
> 
> Any help?
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to