Can I see the latest error messages to confirm what you are getting? Graham
> On 8 Feb 2018, at 11:11 am, David Cansler <[email protected]> wrote: > > That makes sense. We did indeed rearrange the structure - we were following > the "Two-Scoops of Django" book, which recommended the config folder. > > I've changed the line in wsgi.py to os.environ["DJANGO_SETTINGS_MODULE"] = > "gov_salaries.config.settings" and then changed it in the manage.py file to > match. > > I've gotten rid of the sys.path.append() calls and added > python-path=/usr/local/webapps to the daemon process in the httpd.conf as you > recommend > > Unfortunately I'm still getting the 'Target WSGI script cannot be loaded..." > > > > On Wednesday, February 7, 2018 at 3:27:05 PM UTC-8, Graham Dumpleton wrote: > There are a few issues here to sort out. > > You said the wsgi.py file contained: > > import sys > import site > import os > > sys.path.append('/usr/local/webapps/gov_salaries') > sys.path.append('/usr/local/webapps/gov_salaries/salaries') > > from django.core.wsgi import get_wsgi_application > > #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") > os.environ["DJANGO_SETTINGS_MODULE"] = "gov_salaries.settings" > application = get_wsgi_application() > > The sys.path.append() calls are intended to say where the project code is. It > should add the directory which is parent to the project, not the project > directory itself. You shouldn't have to add any sub directories of the > project directory either. > > Ideally though you would not do it this way when using mod_wsgi daemon mode. > The better way is to use the python-path option to WSGIDaemonProcess. > > WSGIDaemonProcess salaries \ > python-home=/usr/local/webapps/gov_salaries/gov_venv \ > python-path=/usr/local/webapps > > Problem is that what you are setting DJANGO_SETTINGS_MODULE to in the wsgi.py > file doesn't match what you are using. You said the Django settings file was > at: > > /usr/local/webapps/gov_salaries/config/settings.py > > The import path for that would mean should use: > > os.environ["DJANGO_SETTINGS_MODULE"] = "gov_salaries.config.settings" > > Normally it would be: > > os.environ["DJANGO_SETTINGS_MODULE"] = "gov_salaries.settings" > > but your code appears to have been reorganised. > > When pushing config down a level like that you need to be a bit careful and > ensure BASE_DIR in the settings module file has been changed to correct work > out the top level directory. > > To sort out what probably has to be used, look in the manage.py file and see > what DJANGO_SETTINGS_MODULE was being set to in that. It should be the same. > > Graham > >> On 8 Feb 2018, at 10:11 am, David Cansler <cans...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> /usr/local/webapps/gov_salaries/config/settings.py >> >> On Wednesday, February 7, 2018 at 3:05:37 PM UTC-8, Graham Dumpleton wrote: >> Lets try this a different way. What is the full path to the Django >> settings.py file for the project. >> >> Graham >> >>> On 8 Feb 2018, at 9:36 am, David Cansler <cans...@ <>gmail.com >>> <http://gmail.com/>> wrote: >>> >>> Thanks for your quick response Graham. >>> This is our first django app and while we have developed the app somewhat >>> successfully (it's still a work in progress), deployment has been left to >>> me. I couldn't find a 'definitive' place where I should put the app, so I >>> made a webapps directory at /usr/local (/usr/local/webapps/gov_salaries) >>> Here's my attempt at doing what you asked to help me troubleshoot. (again, >>> thanks for taking the time): >>> >>> (gov_venv) [devwebuser@87670-newsdev gov_salaries]$ python manage.py shell >>> Python 3.6.4 (default, Feb 2 2018, 16:08:02) >>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux >>> Type "help", "copyright", "credits" or "license" for more information. >>> (InteractiveConsole) >>> >>> print(gov_salaries.__file__) >>> Traceback (most recent call last): >>> File "<console>", line 1, in <module> >>> NameError: name 'gov_salaries' is not defined >>> >>> import gov_salaries >>> Traceback (most recent call last): >>> File "<console>", line 1, in <module> >>> ModuleNotFoundError: No module named 'gov_salaries' >>> >>> import salaries >>> >>> print(salaries.__file__) >>> /usr/local/webapps/gov_salaries/salaries/__init__.py >>> >>> >>> >>> Where is the gov_salaries package installed? >>> >>> If you can import it from command line Python, what does: >>> >>> print(gov_salaries.__file__) >>> >>> show? >>> >>> Graham >>> >>>> On 8 Feb 2018, at 7:09 am, David Cansler <cans...@ <>gmail.com >>>> <http://gmail.com/>> wrote: >>>> >>>> I'm trying to deploy a Django app onto a Centos 6.9 server and I'm getting >>>> the error Target WSGI script "wsgi.py" cannot be loaded as pyhton module. >>>> I've run through the troubleshooting tips and am now at a point where I >>>> could use some help. >>>> Here's my setup >>>> >>>> The server: >>>> Last Update Run: Sun Feb 04 09:00:34 +0000 2018, state OK >>>> Patching Group : auto >>>> OS Detection : CentOS 6.9 amd64 (yum) >>>> KERNEL updates : false (2.6.32-504.23.4.el6.x86_64) >>>> >>>> [devwebuser@87670-newsdev gov_salaries]$ httpd -V >>>> Server version: Apache/2.2.15 (Unix) >>>> Server built: Oct 19 2017 16:43:38 >>>> Server's Module Magic Number: 20051115:25 >>>> Server loaded: APR 1.3.9, APR-Util 1.3.9 >>>> Compiled using: APR 1.3.9, APR-Util 1.3.9 >>>> Architecture: 64-bit >>>> Server MPM: Prefork >>>> threaded: no >>>> forked: yes (variable process count) >>>> Server compiled with.... >>>> -D APACHE_MPM_DIR="server/mpm/prefork" >>>> -D APR_HAS_SENDFILE >>>> -D APR_HAS_MMAP >>>> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) >>>> -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=128 >>>> -D HTTPD_ROOT="/etc/httpd" >>>> -D SUEXEC_BIN="/usr/sbin/suexec" >>>> -D DEFAULT_PIDLOG="run/httpd.pid" >>>> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" >>>> -D DEFAULT_LOCKFILE="logs/accept.lock" >>>> -D DEFAULT_ERRORLOG="logs/error_log" >>>> -D AP_TYPES_CONFIG_FILE="conf/mime.types" >>>> -D SERVER_CONFIG_FILE="conf/httpd.conf" >>>> >>>> Installed python3.6.4: >>>> ./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath >>>> /usr/local/lib" >>>> >>>> Installed mod_wsgi-4.5.24 >>>> ./configure --with-python=/usr/local/bin/python3.6 >>>> LD_RUN_PATH=/usr/local/lib make >>>> sudo make install >>>> >>>> Looks good with mod_wsgi and shared python library: >>>> [devwebuser@87670-newsdev modules]$ ldd /etc/httpd/modules/mod_wsgi.so >>>> linux-vdso.so.1 => (0x00007fff9f3f3000) >>>> libpython3.6m.so.1.0 => /usr/local/lib/libpython3.6m.so.1.0 >>>> (0x00007f4aa66a6000) >>>> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4aa647a000) >>>> libdl.so.2 => /lib64/libdl.so.2 (0x00007f4aa6276000) >>>> libutil.so.1 => /lib64/libutil.so.1 (0x00007f4aa6073000) >>>> librt.so.1 => /lib64/librt.so.1 (0x00007f4aa5e6a000) >>>> libm.so.6 => /lib64/libm.so.6 (0x00007f4aa5be6000) >>>> libc.so.6 => /lib64/libc.so.6 (0x00007f4aa5852000) >>>> /lib64/ld-linux-x86-64.so.2 (0x00000032f0c00000) >>>> >>>> Create virtual environment, etc.: >>>> [devwebuser@87670-newsdev gov_salaries]$ python3 -m venv >>>> /usr/local/webapps/gov_salaries/gov_venv >>>> [devwebuser@87670-newsdev gov_salaries]$ source >>>> /usr/local/webapps/gov_salaries/gov_venv/bin/activate >>>> (gov_venv) [devwebuser@87670-newsdev gov_salaries]$ pip install -r >>>> requirements.txt >>>> (gov_venv) [devwebuser@87670-newsdev gov_salaries]$ pip freeze >>>> Django==1.11.4 >>>> django-bootstrap4==0.0.4 >>>> django-crispy-forms==1.6.1 >>>> django-debug-toolbar==1.9.1 >>>> django-filter==1.0.4 >>>> django-tables2==1.10.0 >>>> psycopg2==2.7.3.2 >>>> pytz==2017.2 >>>> sqlparse==0.2.4 >>>> >>>> Location of virtual environment: >>>> (gov_venv) [devwebuser@87670-newsdev gov_salaries]$ python -c 'import sys; >>>> print(sys.prefix)' >>>> /usr/local/webapps/gov_salaries/gov_venv >>>> >>>> httpd.conf file (I deleted most commented lines for brevity): >>>> >>>> ServerRoot "/etc/httpd" >>>> >>>> PidFile run/httpd.pid >>>> >>>> Timeout 60 >>>> >>>> KeepAlive Off >>>> MaxKeepAliveRequests 100 >>>> >>>> KeepAliveTimeout 15 >>>> >>>> <IfModule prefork.c> >>>> StartServers 8 >>>> MinSpareServers 5 >>>> MaxSpareServers 20 >>>> ServerLimit 256 >>>> MaxClients 256 >>>> MaxRequestsPerChild 4000 >>>> </IfModule> >>>> >>>> <IfModule worker.c> >>>> StartServers 4 >>>> MaxClients 300 >>>> MinSpareThreads 25 >>>> MaxSpareThreads 75 >>>> ThreadsPerChild 25 >>>> MaxRequestsPerChild 0 >>>> </IfModule> >>>> >>>> Listen 80 >>>> >>>> LoadModule auth_basic_module modules/mod_auth_basic.so >>>> LoadModule auth_digest_module modules/mod_auth_digest.so >>>> LoadModule authn_file_module modules/mod_authn_file.so >>>> LoadModule authn_alias_module modules/mod_authn_alias.so >>>> LoadModule authn_anon_module modules/mod_authn_anon.so >>>> LoadModule authn_dbm_module modules/mod_authn_dbm.so >>>> LoadModule authn_default_module modules/mod_authn_default.so >>>> LoadModule authz_host_module modules/mod_authz_host.so >>>> LoadModule authz_user_module modules/mod_authz_user.so >>>> LoadModule authz_owner_module modules/mod_authz_owner.so >>>> LoadModule authz_groupfile_module modules/mod_authz_groupfile.so >>>> LoadModule authz_dbm_module modules/mod_authz_dbm.so >>>> LoadModule authz_default_module modules/mod_authz_default.so >>>> LoadModule ldap_module modules/mod_ldap.so >>>> LoadModule authnz_ldap_module modules/mod_authnz_ldap.so >>>> # LoadModule include_module modules/mod_include.so >>>> LoadModule log_config_module modules/mod_log_config.so >>>> LoadModule logio_module modules/mod_logio.so >>>> LoadModule env_module modules/mod_env.so >>>> LoadModule ext_filter_module modules/mod_ext_filter.so >>>> LoadModule mime_magic_module modules/mod_mime_magic.so >>>> LoadModule expires_module modules/mod_expires.so >>>> LoadModule deflate_module modules/mod_deflate.so >>>> LoadModule headers_module modules/mod_headers.so >>>> LoadModule usertrack_module modules/mod_usertrack.so >>>> LoadModule setenvif_module modules/mod_setenvif.so >>>> LoadModule mime_module modules/mod_mime.so >>>> LoadModule dav_module modules/mod_dav.so >>>> LoadModule status_module modules/mod_status.so >>>> # LoadModule autoindex_module modules/mod_autoindex.so >>>> # LoadModule info_module modules/mod_info.so >>>> LoadModule dav_fs_module modules/mod_dav_fs.so >>>> LoadModule vhost_alias_module modules/mod_vhost_alias.so >>>> LoadModule negotiation_module modules/mod_negotiation.so >>>> LoadModule dir_module modules/mod_dir.so >>>> LoadModule actions_module modules/mod_actions.so >>>> LoadModule speling_module modules/mod_speling.so >>>> # LoadModule userdir_module modules/mod_userdir.so >>>> LoadModule alias_module modules/mod_alias.so >>>> LoadModule substitute_module modules/mod_substitute.so >>>> LoadModule rewrite_module modules/mod_rewrite.so >>>> LoadModule proxy_module modules/mod_proxy.so >>>> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so >>>> LoadModule proxy_ftp_module modules/mod_proxy_ftp.so >>>> LoadModule proxy_http_module modules/mod_proxy_http.so >>>> LoadModule proxy_ajp_module modules/mod_proxy_ajp.so >>>> LoadModule proxy_connect_module modules/mod_proxy_connect.so >>>> LoadModule cache_module modules/mod_cache.so >>>> LoadModule suexec_module modules/mod_suexec.so >>>> LoadModule disk_cache_module modules/mod_disk_cache.so >>>> LoadModule cgi_module modules/mod_cgi.so >>>> LoadModule version_module modules/mod_version.so >>>> #LoadModule passenger_module >>>> /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.59/buildout/apache2/mod_passenger.so >>>> # >>>> # The following modules are not loaded by default: >>>> # >>>> #LoadModule asis_module modules/mod_asis.so >>>> #LoadModule authn_dbd_module modules/mod_authn_dbd.so >>>> #LoadModule cern_meta_module modules/mod_cern_meta.so >>>> #LoadModule cgid_module modules/mod_cgid.so >>>> #LoadModule dbd_module modules/mod_dbd.so >>>> #LoadModule dumpio_module modules/mod_dumpio.so >>>> #LoadModule filter_module modules/mod_filter.so >>>> #LoadModule ident_module modules/mod_ident.so >>>> #LoadModule log_forensic_module modules/mod_log_forensic.so >>>> #LoadModule unique_id_module modules/mod_unique_id.so >>>> LoadModule wsgi_module modules/mod_wsgi.so >>>> WSGISocketPrefix /var/run/wsgi >>>> >>>> Include conf.d/*.conf >>>> >>>> # >>>> # ExtendedStatus controls whether Apache will generate "full" status >>>> # information (ExtendedStatus On) or just basic information (ExtendedStatus >>>> # Off) when the "server-status" handler is called. The default is Off. >>>> # >>>> ExtendedStatus On >>>> >>>> # >>>> # If you wish httpd to run as a different user or group, you must run >>>> # httpd as root initially and it will switch. >>>> # >>>> # User/Group: The name (or #number) of the user/group to run httpd as. >>>> # . On SCO (ODT 3) use "User nouser" and "Group nogroup". >>>> # . On HPUX you may not be able to use shared memory as nobody, and the >>>> # suggested workaround is to create a user www and use that user. >>>> # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) >>>> # when the value of (unsigned)Group is above 60000; >>>> # don't use Group #-1 on these systems! >>>> # >>>> User apache >>>> Group apache >>>> >>>> ### Section 2: 'Main' server configuration >>>> # >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> >>>> ServerName newsdev.oregonian.com:80 <http://newsdev.oregonian.com/> >>>> >>>> UseCanonicalName Off >>>> >>>> DocumentRoot "/var/www/html/newsdev.oregonian.com >>>> <http://newsdev.oregonian.com/>" >>>> >>>> <Directory /> >>>> Order Deny,Allow >>>> deny from all >>>> </Directory> >>>> >>>> # >>>> # This should be changed to whatever you set DocumentRoot to. >>>> # >>>> <Directory "/var/www/html/newsdev.oregonian.com >>>> <http://newsdev.oregonian.com/>"> >>>> >>>> # >>>> # Possible values for the Options directive are "None", "All", >>>> # or any combination of: >>>> # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews >>>> # >>>> # Note that "MultiViews" must be named *explicitly* --- "Options All" >>>> # doesn't give it to you. >>>> # >>>> # The Options directive is both complicated and important. Please see >>>> # http://httpd.apache.org/docs/2.2/mod/core.html#options >>>> <http://httpd.apache.org/docs/2.2/mod/core.html#options> >>>> # for more information. >>>> # >>>> Options -Indexes FollowSymLinks >>>> >>>> # >>>> # AllowOverride controls what directives may be placed in .htaccess files. >>>> # It can be "All", "None", or any combination of the keywords: >>>> # Options FileInfo AuthConfig Limit >>>> # >>>> AllowOverride None >>>> >>>> # >>>> # Controls who can get stuff from this server. >>>> # >>>> Order allow,deny >>>> Allow from all >>>> >>>> </Directory> >>>> >>>> # >>>> # UserDir: The name of the directory that is appended onto a user's home >>>> # directory if a ~user request is received. >>>> # >>>> # The path to the end user account 'public_html' directory must be >>>> # accessible to the webserver userid. This usually means that ~userid >>>> # must have permissions of 711, ~userid/public_html must have permissions >>>> # of 755, and documents contained therein must be world-readable. >>>> # Otherwise, the client will only receive a "403 Forbidden" message. >>>> # >>>> # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden >>>> <http://httpd.apache.org/docs/misc/FAQ.html#forbidden> >>>> # >>>> #<IfModule mod_userdir.c> >>>> # >>>> # UserDir is disabled by default since it can confirm the presence >>>> # of a username on the system (depending on home directory >>>> # permissions). >>>> # >>>> # UserDir disabled >>>> >>>> # >>>> # To enable requests to /~user/ to serve the user's public_html >>>> # directory, remove the "UserDir disabled" line above, and uncomment >>>> # the following line instead: >>>> # >>>> #UserDir public_html >>>> >>>> #</IfModule> >>>> >>>> >>>> DirectoryIndex index.html index.html.var >>>> >>>> # >>>> # AccessFileName: The name of the file to look for in each directory >>>> # for additional configuration directives. See also the AllowOverride >>>> # directive. >>>> # >>>> AccessFileName .htaccess >>>> >>>> # >>>> # The following lines prevent .htaccess and .htpasswd files from being >>>> # viewed by Web clients. >>>> # >>>> <Files ~ "^\.ht"> >>>> Order allow,deny >>>> Deny from all >>>> Satisfy All >>>> </Files> >>>> >>>> # >>>> # TypesConfig describes where the mime.types file (or equivalent) is >>>> # to be found. >>>> # >>>> TypesConfig /etc/mime.types >>>> >>>> DefaultType text/plain >>>> >>>> # >>>> # The mod_mime_magic module allows the server to use various hints from the >>>> # contents of the file itself to determine its type. The MIMEMagicFile >>>> # directive tells the module where the hint definitions are located. >>>> # >>>> <IfModule mod_mime_magic.c> >>>> # MIMEMagicFile /usr/share/magic.mime >>>> MIMEMagicFile conf/magic >>>> </IfModule> >>>> >>>> HostnameLookups Off >>>> >>>> ErrorLog logs/error_log >>>> >>>> LogLevel info >>>> >>>> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" >>>> combined >>>> LogFormat "%h %l %u %t \"%r\" %>s %b" common >>>> LogFormat "%{Referer}i -> %U" referer >>>> LogFormat "%{User-agent}i" agent >>>> >>>> CustomLog logs/access_log combined >>>> >>>> ServerSignature On >>>> >>>> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" >>>> >>>> # >>>> # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased >>>> # CGI directory exists, if you have that configured. >>>> # >>>> <Directory "/var/www/cgi-bin"> >>>> AllowOverride None >>>> Options None >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> AddLanguage ca .ca >>>> AddLanguage cs .cz .cs >>>> AddLanguage da .dk >>>> AddLanguage de .de >>>> AddLanguage el .el >>>> AddLanguage en .en >>>> AddLanguage eo .eo >>>> AddLanguage es .es >>>> AddLanguage et .et >>>> AddLanguage fr .fr >>>> AddLanguage he .he >>>> AddLanguage hr .hr >>>> AddLanguage it .it >>>> AddLanguage ja .ja >>>> AddLanguage ko .ko >>>> AddLanguage ltz .ltz >>>> AddLanguage nl .nl >>>> AddLanguage nn .nn >>>> AddLanguage no .no >>>> AddLanguage pl .po >>>> AddLanguage pt .pt >>>> AddLanguage pt-BR .pt-br >>>> AddLanguage ru .ru >>>> AddLanguage sv .sv >>>> AddLanguage zh-CN .zh-cn >>>> AddLanguage zh-TW .zh-tw >>>> >>>> LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no >>>> pl pt pt-BR ru sv zh-CN zh-TW >>>> >>>> ForceLanguagePriority Prefer Fallback >>>> >>>> AddDefaultCharset UTF-8 >>>> >>>> AddType application/x-compress .Z >>>> AddType application/x-gzip .gz .tgz >>>> >>>> AddType application/x-x509-ca-cert .crt >>>> AddType application/x-pkcs7-crl .crl >>>> >>>> >>>> AddHandler type-map var >>>> >>>> AddType text/html .shtml >>>> AddOutputFilter INCLUDES .shtml >>>> >>>> >>>> Alias /error/ "/var/www/error/" >>>> >>>> <IfModule mod_negotiation.c> >>>> <IfModule mod_include.c> >>>> <Directory "/var/www/error"> >>>> AllowOverride None >>>> Options IncludesNoExec >>>> AddOutputFilter Includes html >>>> AddHandler type-map var >>>> Order allow,deny >>>> Allow from all >>>> LanguagePriority en es de fr >>>> ForceLanguagePriority Prefer Fallback >>>> </Directory> >>>> >>>> # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var >>>> # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var >>>> # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var >>>> # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var >>>> # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var >>>> # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var >>>> # ErrorDocument 410 /error/HTTP_GONE.html.var >>>> # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var >>>> # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var >>>> # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var >>>> # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var >>>> # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var >>>> # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var >>>> # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var >>>> # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var >>>> # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var >>>> # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var >>>> >>>> </IfModule> >>>> </IfModule> >>>> >>>> # >>>> # The following directives modify normal HTTP response behavior to >>>> # handle known problems with browser implementations. >>>> # >>>> BrowserMatch "Mozilla/2" nokeepalive >>>> BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 >>>> BrowserMatch "RealPlayer 4\.0" force-response-1.0 >>>> BrowserMatch "Java/1\.0" force-response-1.0 >>>> BrowserMatch "JDK/1\.0" force-response-1.0 >>>> >>>> # >>>> # The following directive disables redirects on non-GET requests for >>>> # a directory that does not include the trailing slash. This fixes a >>>> # problem with Microsoft WebFolders which does not appropriately handle >>>> # redirects for folders with DAV methods. >>>> # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. >>>> # >>>> BrowserMatch "Microsoft Data Access Internet Publishing Provider" >>>> redirect-carefully >>>> BrowserMatch "MS FrontPage" redirect-carefully >>>> BrowserMatch "^WebDrive" redirect-carefully >>>> BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully >>>> BrowserMatch "^gnome-vfs/1.0" redirect-carefully >>>> BrowserMatch "^XML Spy" redirect-carefully >>>> BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully >>>> >>>> # >>>> # Allow server status reports generated by mod_status, >>>> # with the URL of http://servername/server-status >>>> <http://servername/server-status> >>>> # Change the ".example.com <http://example.com/>" to match your domain to >>>> enable. >>>> # >>>> <Location /server-status> >>>> SetHandler server-status >>>> Order allow,deny >>>> Allow from all >>>> </Location> >>>> >>>> # >>>> # Allow remote server configuration reports, with the URL of >>>> # http://servername/server-info <http://servername/server-info> (requires >>>> that mod_info.c be loaded). >>>> # Change the ".example.com <http://example.com/>" to match your domain to >>>> enable. >>>> # >>>> #<Location /server-info> >>>> # SetHandler server-info >>>> # Order deny,allow >>>> # Deny from all >>>> # Allow from .example.com <http://example.com/> >>>> #</Location> >>>> >>>> # >>>> # Proxy Server directives. Uncomment the following lines to >>>> # enable the proxy server: >>>> # >>>> #<IfModule mod_proxy.c> >>>> #ProxyRequests On >>>> # >>>> #<Proxy *> >>>> # Order deny,allow >>>> # Deny from all >>>> # Allow from .example.com <http://example.com/> >>>> #</Proxy> >>>> >>>> # >>>> # Enable/disable the handling of HTTP/1.1 "Via:" headers. >>>> # ("Full" adds the server version; "Block" removes all outgoing Via: >>>> headers) >>>> # Set to one of: Off | On | Full | Block >>>> # >>>> #ProxyVia On >>>> >>>> # >>>> # To enable a cache of proxied content, uncomment the following lines. >>>> # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html >>>> <http://httpd.apache.org/docs/2.2/mod/mod_cache.html> for more details. >>>> # >>>> #<IfModule mod_disk_cache.c> >>>> # CacheEnable disk / >>>> # CacheRoot "/var/cache/mod_proxy" >>>> #</IfModule> >>>> # >>>> >>>> #</IfModule> >>>> # End of proxy directives. >>>> >>>> # Load Passenger module for Ruby >>>> >>>> <IfModule mod_passenger.c> >>>> PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.59 >>>> PassengerDefaultRuby /usr/bin/ruby >>>> </IfModule> >>>> >>>> ### Section 3: Virtual Hosts >>>> # >>>> >>>> <VirtualHost *:80> >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> ServerName newsdev.oregonian.com <http://newsdev.oregonian.com/> >>>> DocumentRoot /var/www/html/newsdev.oregonian.com >>>> <http://newsdev.oregonian.com/> >>>> RewriteEngine On >>>> <Directory /var/www/html/newsdev.oregonian.com >>>> <http://newsdev.oregonian.com/>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> Alias /static/ /var/www/static/ >>>> >>>> WSGIDaemonProcess salaries >>>> python-home=/usr/local/webapps/gov_salaries/gov_venv >>>> WSGIApplicationGroup %{GLOBAL} >>>> WSGIScriptAlias /salaries >>>> /usr/local/webapps/gov_salaries/config/wsgi.py process-group=salaries >>>> >>>> <Directory /usr/local/webapps/gov_salaries> >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> <Directory /usr/local/webapps/gov_salaries/config> >>>> <Files wsgi.py> >>>> Order allow,deny >>>> Allow from all >>>> </Files> >>>> </Directory> >>>> >>>> <Directory /var/www/static> >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> >>>> >>>> </VirtualHost> >>>> >>>> <VirtualHost *:80> >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> ServerName datawrapper.oregonian.com >>>> <http://datawrapper.oregonian.com/> >>>> DocumentRoot /var/www/html/datawrapper/www >>>> #RewriteEngine On >>>> <Directory /var/www/html/datawrapper/www/> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> </VirtualHost> >>>> >>>> <VirtualHost *:80> >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> ServerName charts.oregonian.com <http://charts.oregonian.com/> >>>> DocumentRoot /var/www/html/datawrapper/charts/static >>>> RewriteEngine On >>>> <Directory /var/www/html/datawrapper/charts/static/> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> </VirtualHost> >>>> >>>> >>>> <VirtualHost *:80> >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> ServerName testapp.oregonian.com <http://testapp.oregonian.com/> >>>> DocumentRoot /var/www/html/newsdev.oregonian.com/recipes/current/public >>>> <http://newsdev.oregonian.com/recipes/current/public> >>>> >>>> #<Location /assets> >>>> #ProxyPass ! >>>> #</Location> >>>> #<Location /system> >>>> #ProxyPass ! >>>> #</Location> >>>> ProxyPass / http://127.0.0.1:9292/ <http://127.0.0.1:9292/> >>>> ProxyPassReverse / http://127.0.0.1:9292/ <http://127.0.0.1:9292/> >>>> >>>> <Directory >>>> /var/www/html/newsdev.oregonian.com/recipes/current/public/system >>>> <http://newsdev.oregonian.com/recipes/current/public/system>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> <Directory >>>> /var/www/html/newsdev.oregonian.com/recipes/current/public/assets >>>> <http://newsdev.oregonian.com/recipes/current/public/assets>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> </VirtualHost> >>>> >>>> >>>> <VirtualHost *:80> >>>> ServerAdmin SysA...@ <>acsor.com <http://acsor.com/> >>>> ServerName testapp2.oregonian.com <http://testapp2.oregonian.com/> >>>> DocumentRoot >>>> /var/www/html/newsdev.oregonian.com/restaurants/current/public >>>> <http://newsdev.oregonian.com/restaurants/current/public> >>>> >>>> #<Location /assets> >>>> #ProxyPass ! >>>> #</Location> >>>> #<Location /system> >>>> #ProxyPass ! >>>> #</Location> >>>> ProxyPass / http://127.0.0.1:9293/ <http://127.0.0.1:9293/> >>>> ProxyPassReverse / http://127.0.0.1:9293/ <http://127.0.0.1:9293/> >>>> >>>> <Directory >>>> /var/www/html/newsdev.oregonian.com/current/public/system >>>> <http://newsdev.oregonian.com/current/public/system>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> <Directory >>>> /var/www/html/newsdev.oregonian.com/restaurants/current/assets >>>> <http://newsdev.oregonian.com/restaurants/current/assets>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> </VirtualHost> >>>> >>>> Alias /news_contacts /var/www/html/news_contacts/current/public >>>> <Directory >>>> /var/www/html/newsdev.oregonian.com/news_contacts/current/public >>>> <http://newsdev.oregonian.com/news_contacts/current/public>> >>>> Options -Indexes FollowSymLinks >>>> AllowOverride All >>>> Order allow,deny >>>> Allow from all >>>> </Directory> >>>> >>>> httpd error log: >>>> [Wed Feb 07 11:09:48 2018] [notice] suEXEC mechanism enabled (wrapper: >>>> /usr/sbin/suexec) >>>> [Wed Feb 07 11:09:48 2018] [info] Init: Seeding PRNG with 256 bytes of >>>> entropy >>>> [Wed Feb 07 11:09:48 2018] [info] Init: Initializing (virtual) servers for >>>> SSL >>>> [Wed Feb 07 11:09:48 2018] [info] mod_ssl/2.2.15 compiled against Server: >>>> Apache/2.2.15, Library: OpenSSL/1.0.1e-fips >>>> [Wed Feb 07 11:09:48 2018] [notice] Digest: generating secret for digest >>>> authentication ... >>>> [Wed Feb 07 11:09:48 2018] [notice] Digest: done >>>> [Wed Feb 07 11:09:48 2018] [info] APR LDAP: Built with OpenLDAP LDAP SDK >>>> [Wed Feb 07 11:09:48 2018] [info] LDAP: SSL support available >>>> [Wed Feb 07 11:09:48 2018] [info] Init: Seeding PRNG with 256 bytes of >>>> entropy >>>> [Wed Feb 07 11:09:48 2018] [info] Shared memory session cache initialised >>>> [Wed Feb 07 11:09:48 2018] [info] Init: Initializing (virtual) servers for >>>> SSL >>>> [Wed Feb 07 11:09:48 2018] [info] mod_ssl/2.2.15 compiled against Server: >>>> Apache/2.2.15, Library: OpenSSL/1.0.1e-fips >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9174): Starting process >>>> 'salaries' with uid=48, gid=48 and threads=15. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9174): Python home >>>> /usr/local/webapps/gov_salaries/gov_venv. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9174): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [notice] Apache/2.2.15 (Unix) DAV/2 >>>> mod_wsgi/4.5.24 Python/3.6 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips >>>> configured -- resuming normal operations >>>> [Wed Feb 07 11:09:48 2018] [info] Server built: Oct 19 2017 16:43:38 >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9177): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9176): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9175): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9178): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9179): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9180): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9181): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9182): Initializing Python. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9177): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9175): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9174): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9181): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9179): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9178): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9176): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9180): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:09:48 2018] [info] mod_wsgi (pid=9182): Attach interpreter >>>> ''. >>>> [Wed Feb 07 11:10:32 2018] [info] [client 50.202.228.131] mod_wsgi >>>> (pid=9174, process='salaries', application=''): Loading WSGI script >>>> '/usr/local/webapps/gov_salaries/config/wsgi.py'. >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] mod_wsgi >>>> (pid=9174): Target WSGI script >>>> '/usr/local/webapps/gov_salaries/config/wsgi.py' cannot be loaded as >>>> Python module. >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] mod_wsgi >>>> (pid=9174): Exception occurred processing WSGI script >>>> '/usr/local/webapps/gov_salaries/config/wsgi.py'. >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] Traceback (most >>>> recent call last): >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/config/wsgi.py", line 21, in <module> >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] application >>>> = get_wsgi_application() >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/gov_venv/lib/python3.6/site-packages/django/core/wsgi.py", >>>> line 13, in get_wsgi_application >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] >>>> django.setup(set_prefix=False) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/gov_venv/lib/python3.6/site-packages/django/__init__.py", >>>> line 22, in setup >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] >>>> configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/gov_venv/lib/python3.6/site-packages/django/conf/__init__.py", >>>> line 56, in __getattr__ >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] >>>> self._setup(name) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/gov_venv/lib/python3.6/site-packages/django/conf/__init__.py", >>>> line 41, in _setup >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] >>>> self._wrapped = Settings(settings_module) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/webapps/gov_salaries/gov_venv/lib/python3.6/site-packages/django/conf/__init__.py", >>>> line 110, in __init__ >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] mod = >>>> importlib.import_module(self.SETTINGS_MODULE) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File >>>> "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in >>>> import_module >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] return >>>> _bootstrap._gcd_import(name[level:], package, level) >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 994, in _gcd_import >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 971, in _find_and_load >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 941, in _find_and_load_unlocked >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 219, in _call_with_frames_removed >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 994, in _gcd_import >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 971, in _find_and_load >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] File "<frozen >>>> importlib._bootstrap>", line 953, in _find_and_load_unlocked >>>> [Wed Feb 07 11:10:32 2018] [error] [client 50.202.228.131] >>>> ModuleNotFoundError: No module named 'gov_salaries' >>>> >>>> wsgi.py file: >>>> import sys >>>> import site >>>> import os >>>> >>>> sys.path.append('/usr/local/webapps/gov_salaries') >>>> sys.path.append('/usr/local/webapps/gov_salaries/salaries') >>>> >>>> from django.core.wsgi import get_wsgi_application >>>> >>>> #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") >>>> os.environ["DJANGO_SETTINGS_MODULE"] = "gov_salaries.settings" >>>> application = get_wsgi_application() >>>> >>>> >>>> -- >>>> 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 modwsgi+u...@ <>googlegroups.com <http://googlegroups.com/>. >>>> To post to this group, send email to mod...@ <>googlegroups.com >>>> <http://googlegroups.com/>. >>>> 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 >>> <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 >> <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] > <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.
