No luck. I'm going to create a Vagrant project, one using Ubuntu 14.04, and
another with Ubuntu 12.04, and see if the problem still persists. Either
way, I can share the server images with you on Github. It will take a day
or two.
On Monday, February 2, 2015 at 8:38:12 PM UTC-5, Graham Dumpleton wrote:
>
> Here Is a configuration I tested with which works in my quick test setup.
> I am using mod_wsgi 4.4.7 and Apache httpd 2.4.12.
>
> I am using port 8443 as I wasn't running as root but myself.
>
> <IfModule !ssl_module>
> LoadModule ssl_module ${HTTPD_MODULES_DIRECTORY}/mod_ssl.so
> </IfModule>
>
> Listen 8443
>
> <VirtualHost *:8443>
>
> SSLEngine On
> SSLCertificateFile /Users/graham/Testing/mod_wsgi-multiple-apps/server.crt
> SSLCertificateKeyFile
> /Users/graham/Testing/mod_wsgi-multiple-apps/server.key
>
> WSGIApplicationGroup %{GLOBAL}
>
> # Setup Python for the App1.
>
> WSGIDaemonProcess app1 threads=5
>
> WSGIScriptAlias /app1
> /Users/graham/Testing/mod_wsgi-multiple-apps/app1/app1.wsgi
>
> <Directory /Users/graham/Testing/mod_wsgi-multiple-apps/app1>
> WSGIProcessGroup app1
> Require all granted
> </Directory>
>
> # Setup Python for the App2.
>
> WSGIDaemonProcess app2 threads=5
>
> WSGIScriptAlias /app2
> /Users/graham/Testing/mod_wsgi-multiple-apps/app2/app2.wsgi
>
> <Directory /Users/graham/Testing/mod_wsgi-multiple-apps/app2>
> WSGIProcessGroup app2
> Require all granted
> </Directory>
>
> </VirtualHost>
>
> Important things to note:
>
> 1. Your original VirtualHost didn't specific the port for the HTTPS
> connections.
>
> 2. Your regional VirtualHost didn't enable SSL within the VirtualHost
> which is required.
>
> 3. I am using:
>
> Require all granted
>
> which is Apache 2.4 way of doing things where as what you had with
> Order/Allow is old deprecated Apache 2.2 way.
>
> Can you look at the above, adjusting ports/paths for things as appropriate
> and try in your setup.
>
> Ensure that no other VirtualHost is setup.
>
> Ensure that the lines:
>
> # Virtual hosts
> #Include /private/etc/apache2/extra/httpd-vhosts.conf
>
> if they exist in Apache httpd.conf are NOT uncommented.
>
> When you have tried, if not working provide the exact configuration you
> used so I can review it.
>
> Graham
>
> On 03/02/2015, at 3:01 AM, Apollo Clark <[email protected] <javascript:>>
> wrote:
>
> It's a single AWS machine, being used internally by the client, to access
> two Flask apps which I've developed. It is only accessible on the client's
> VPN. Therefore, it does not have a DNS entry, and I cannot use sub-domains,
> nor port routing. I cannot change this. The solution is to figure out how
> to host multiple apps on different sub-folders, OR request another server
> and wait 4 weeks.
>
> I can configure the server as I want, but cannot open any ports, and
> cannot make it public accessible beyond the VPN.
>
> I've seen 3 possible answers:
> - Flask front-controller to manually split the requests
> - Apache ProxyPass
> - Nginx routing
>
> None of these are particularly elegant, and will be tedious to maintain,
> and difficult to automate. I'm going to attempt to do the same
> configuration in Ubuntu 12.04, and see if I can get that working. Next I'll
> move onto ProxyPass, and if all else fails, I'll use Nginx.
>
>
>
> On Monday, February 2, 2015 at 5:00:13 AM UTC-5, Graham Dumpleton wrote:
>>
>>
>> On 31/01/2015, at 5:53 AM, Apollo Clark <[email protected]> wrote:
>>
>> I want to host multiple Flask apps under the same domain, ex:
>> example.com/app1
>> example.com/app2
>>
>>
>> *System configuration:*Ubuntu 14.04 TLS
>> Apache 2.4.7ubuntu4.1
>> mod_wsgi 4.4.6
>> Python 2.7.6
>>
>> You can find my VirtualHost config here:
>> https://gist.github.com/apolloclark/3f0e52c527dc169fa982
>> This configuration does not work.
>>
>> However, when I set:
>> WSGIScriptAlias / /var/www/app1/app1.wsgi
>> I am able to access: example.com/app1
>>
>> I am not seeing any errors in the Apache logs file.
>>
>>
>> Sorry for the slow reply on this one. Have managed to finally catch up.
>>
>> Now when you say:
>>
>> """It needs to be on a shared hosting machine, per a client's security
>> requirements."""
>>
>> what does that actually mean?
>>
>> Are you saying that there are over web applications and/or sites already
>> being hosted on the same Apache installation.
>>
>> Normally on a shared hosting machine where there are multiple sites, they
>> are separate using name based virtual hosts. For that to work each site
>> must have its own unique host name.
>>
>> You say you cannot use a new sub domain, which if it is a traditional
>> shared hosting environment, that would preclude it being used then.
>>
>> Can you therefore clarify whether the Apache instance is actually shared
>> or whether you have complete control to do what you want with the Apache
>> configuration and that the Apache instance can have sole access to port 443
>> for HTTPS connections.
>>
>> BTW, I use the term HTTPS meaning secure HTTP.
>>
>> To use the term SSL is actually a misnomer and SSL isn't actually used
>> any more and TLS is used. It is therefore more correct to really refer to
>> it as HTTPS.
>>
>> Graham
>>
>>
> --
> 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] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit 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 http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.