Oops, sorry. I completely missed the use of setup-server instead of start-server. Sorry for the noise.
On Wednesday, January 22, 2020 at 12:52:31 PM UTC-5, Lou King wrote: > > I may have answered my own question. When I run the mod_wsgi-express > command it seems to run in the foreground. I don't understand the use of > the <wsgi-dir>apachectl. > > $ sudo /root/bin/init-mod_wsgi-express runningroutes sandbox.routes. > loutilities.com routesmgr routesmgr 8002 > Server URL : http://proxysvr.loutilities.com:8002/ > Server Root : /etc/mod_wsgi-express/sandbox.routes.loutilities.com > Server Conf : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/ > httpd.conf > Error Log File : > /etc/mod_wsgi-express/sandbox.routes.loutilities.com/error_log > (warn) > Request Capacity : 5 (1 process * 5 threads) > Request Timeout : 60 (seconds) > Startup Timeout : 15 (seconds) > Queue Backlog : 100 (connections) > Queue Timeout : 45 (seconds) > Server Capacity : 20 (event/worker), 20 (prefork) > Server Backlog : 500 (connections) > Locale Setting : en_US.UTF-8 > > > > where /root/bin/init-mod_wsgi-express contains > > $ sudo cat /root/bin/init-mod_wsgi-express > #!/bin/bash > if [[ $# -lt 5 ]] ; then > echo "usage:" > echo " init-mod_wsgi-express project servername user group port" > exit 0 > fi > > > source /var/www/$2/venv/bin/activate > mod_wsgi-express start-server --server-name proxysvr.loutilities.com --port > $5 --user $3 --group $4 /var/www/$2/$1/$1/$1.wsgi --working-directory /var > /www/$2/$1/$1/ --server-root /etc/mod_wsgi-express/$2 > deactivate > > > > > On Wednesday, January 22, 2020 at 9:51:44 AM UTC-5, Lou King wrote: >> >> Thanks. I want to make sure I understand. It seems like at >> https://pypi.org/project/mod-wsgi/ "Running mod_wsgi-express as root" it >> says the process is similar to: >> >> - run mod_wsgi-express ... --server-root=<wsgi-dir> >> - create systemd service file which runs <wsgi-dir>/apachectl >> start/stop commands >> >> i.e., the mod_wsgi-express command is executed once to create the >> environment, and the <wsgi-dir>/apachectl command is used when service is >> started/stopped/restarted >> >> Am I getting this right? >> >> On Wednesday, January 22, 2020 at 7:31:35 AM UTC-5, Graham Dumpleton >> wrote: >>> >>> If using mod_wsgi-express as a system service, ensure you set >>> —server-root so that files aren’t placed in /tmp. Using /tmp as a >>> persistent location can fail if the Linux system implements a cron job that >>> removes stuff under /tmp if older than a certain date. >>> >>> The note about using —server-root in this case is mentioned in: >>> >>> https://pypi.org/project/mod-wsgi/ >>> >>> along with other suggestions about using generated config for >>> integration into system init scripts. >>> >>> Graham >>> >>> On 22 Jan 2020, at 1:52 am, Lou King <[email protected]> wrote: >>> >>> Everything was running along fine, then all of a sudden I received >>> complaints that people were getting 403 forbidden from my server. >>> >>> I looked in all the /var/log, server logs, etc., but didn't think to >>> look at /tmp/mod_wsgi-localhost:8001:0/error_log until after restarting >>> the service (I'm using systemd). I knew the 403 errors started at 8:21 Jan >>> 21 by viewing the virtual host's request log, but after restarting the >>> service found the following in the mod_wsgi log: >>> >>> [Mon Jan 20 21:53:13.249739 2020] [wsgi:error] [pid 20392:tid >>> 140270704191232] [remote 198.199.82.162:35964] [2020-01-20 21:53:13,249] >>> INFO in __init__: 66.249.79.119: GET http:// >>> routes.loutilities.com/robots.txt/routes 403 >>> [Mon Jan 20 21:53:13.549214 2020] [wsgi:error] [pid 20392:tid >>> 140270695798528] [remote 198.199.82.162:35968] [2020-01-20 21:53:13,549] >>> INFO in __init__: 66.249.79.121: GET http:// >>> routes.loutilities.com/fsrc/routes 200 >>> [Tue Jan 21 04:47:53.399163 2020] [wsgi:error] [pid 20392:tid >>> 140270704191232] [remote 198.199.82.162:42670] [2020-01-21 04:47:53,398] >>> INFO in __init__: 173.252.87.47: GET http://routes.loutilities.com/ 302 >>> [Tue Jan 21 04:47:55.573795 2020] [wsgi:error] [pid 20392:tid >>> 140270695798528] [remote 198.199.82.162:42674] [2020-01-21 04:47:55,573] >>> INFO in __init__: 173.252.95.26: GET http://routes.loutilities.com/ 302 >>> [Tue Jan 21 08:21:05.017486 2020] [authz_core:error] [pid 20393:tid >>> 140271178082048] [client 198.199.82.162:49262] AH01630: client denied by >>> server configuration: /tmp/mod_wsgi-localhost:8001:0/htdocs, referer: >>> https://steeplechasers.org/training/running-routes/ >>> [Tue Jan 21 08:21:09.020530 2020] [authz_core:error] [pid 20420:tid >>> 140271178348288] [client 198.199.82.162:49264] AH01630: client denied by >>> server configuration: /tmp/mod_wsgi-localhost:8001:0/htdocs, referer: >>> https://steeplechasers.org/training/running-routes/</spa >>> >>> -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/bc4720aa-df3e-4e0c-a291-773523433b7b%40googlegroups.com.
