Graham,

Thanks for the quick reply.  I am striving to work independently here.  
I've made the modification, wordpress, is still not loading and have the 
following in the error.log file:

[Thu Sep 10 23:53:15.963956 2020] [mpm_prefork:notice] [pid 40224] AH00163: 
Apache/2.4.41 (Ubuntu) mod_wsgi/4.6.8 Python/3.8 configured -- resuming 
normal operations
[Thu Sep 10 23:53:15.964004 2020] [core:notice] [pid 40224] AH00094: 
Command line: '/usr/sbin/apache2'
[Thu Sep 10 23:53:27.097927 2020] [rewrite:error] [pid 43290] [client 
99.46.143.132:55785] AH00670: Options FollowSymLinks and 
SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also 
forbidden due to its similar ability to circumvent directory restrictions : 
/var/www/html/wp-admin/, referer: http://thegacway.com/wp-login.php

My assumption is that the configuration you have outlined should work for 
wordpress in absence of any wsgi files and am trying to setup the .conf 
file so that it first works with wordpress and then add the python and get 
that working.

Here's the configuration file:

<Directory /var/www/html>
        Require all granted
</Directory>
WSGIRestrictEmbedded On
<VirtualHost *:80>
        ServerName thegacway.com
        ServerAlias www.thegacway.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Define a mod_wsgi daemon process group.
        WSGIDaemonProcess www.thegacway.com display-name=%{GROUP}
        # Force the Python web application to run in the mod_wsgi daemon 
process group.
        WSGIProcessGroup www.thegacway.com
        WSGIApplicationGroup %{GLOBAL}
        # Disable embedded mode of mod_wsgi.
        # Set document root and rules for access.
        #DocumentRoot /var/www/html
        <Directory /var/www/html>
            Options ExecCGI
            DirectoryIndex index.php
            AddHandler application/x-httpd-php .php
            AddHandler wsgi-script .py
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /main.py/$1 [QSA,PT,L]
        </Directory>

        #LogLevel info ssl:warn

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

</VirtualHost>
On Thursday, September 10, 2020 at 4:12:58 PM UTC-7 Graham Dumpleton wrote:

> Only WSGIRestrictEmbedded needs to be outside of the VirtualHost. Leave 
> everything else you may have inside of the VirtualHost.
>
> On 11 Sep 2020, at 8:17 am, Gordon Charles <gac...@gmail.com> wrote:
>
> I've been trying to create a .conf file which would simultaneously support 
> Wordpress and Flask (I have some flask apps which run as part of an 
> embedded solution and would like for others to be able to drive the 
> application in a simulation mode and like the idea of having a site wide 
> implementation via flask for consistency.
>
> I've been following the guidance found here:
> Graham Dumpleton Post 
> <http://blog.dscpl.com.au/2014/09/hosting-php-web-applications-in.html>
> and here:
> mod_wsgi docs <https://modwsgi.readthedocs.io/en/develop/index.html>
>
> I'm running on Ubuntu 20.04.1 LTS
> Apache/2.4.41
> Python 3.8.2
>
> When I include the suggested configuration described in the Graham 
> Dumpleton Post 
> <http://blog.dscpl.com.au/2014/09/hosting-php-web-applications-in.html> 
> inside 
> of the VirtualHost definition I get the following:
> WSGIRestrictEmbedded cannot occur within <VirtualHost> section
> Action 'restart' failed.
>
> When I include the suggested configuration outside of the VirtualHost 
> definition it breaks wordpress.
>
> Any guidance here would be appriciated.
>
>
>
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/ded196fd-0b21-44ba-b6d5-b91b194e196dn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/modwsgi/ded196fd-0b21-44ba-b6d5-b91b194e196dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/6b61b8c9-4a3b-4c1c-bfc7-6f732542f975n%40googlegroups.com.

Reply via email to