httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Mehler <dave.meh...@gmail.com>
Subject Re: [users@httpd] apache 2.4 and python
Date Mon, 12 Feb 2018 16:11:15 GMT
Hello,

Here you go.

Thanks.
Dave.

#httpd -S
VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server git.example.com
(/usr/local/etc/apache24/Includes/git.conf:2)
         port 80 namevhost git.example.com
(/usr/local/etc/apache24/Includes/git.conf:2)
         port 80 namevhost example.com
(/usr/local/etc/apache24/Includes/vhosts.conf:6)
                 alias www.example.com
                 alias mail.example.com
         port 80 namevhost webmail.example.com
(/usr/local/etc/apache24/Includes/vhosts.conf:72)
                 alias webmail.example.com
         port 80 namevhost example3.com
(/usr/local/etc/apache24/Includes/vhosts.conf:138)
                 alias www.example3.com
         port 80 namevhost example2.com
(/usr/local/etc/apache24/Includes/vhosts.conf:156)
                 alias www.example2.com
         port 80 namevhost webmail.example2.com
(/usr/local/etc/apache24/Includes/vhosts.conf:174)
                 alias webmail.example2.com
*:443                  is a NameVirtualHost
         default server www.example.com
(/usr/local/etc/apache24/extra/httpd-ssl.conf:52)
         port 443 namevhost www.example.com
(/usr/local/etc/apache24/extra/httpd-ssl.conf:52)
         port 443 namevhost git.example.com
(/usr/local/etc/apache24/Includes/git.conf:29)
         port 443 namevhost example.com
(/usr/local/etc/apache24/Includes/vhosts.conf:46)
                 alias www.example.com
                 alias mail.example.com
         port 443 namevhost webmail.example.com
(/usr/local/etc/apache24/Includes/vhosts.conf:111)
                 alias webmail.example.com
         port 443 namevhost webmail.example2.com
(/usr/local/etc/apache24/Includes/vhosts.conf:213)
                 alias webmail.example2.com
ServerRoot: "/usr/local"
Main DocumentRoot: "/usr/local/www/apache24/data"
Main ErrorLog: "/var/log/httpd-error.log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex authn-socache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www" id=80
Group: name="www" id=80

mod_wsgi.conf:
LoadModule wsgi_module        libexec/apache24/mod_wsgi.so

WSGIScriptAlias /myapp /usr/local/www/wsgi-scripts/myapp.wsgi
<Directory /usr/local/www/wsgi-scripts>
Options +ExecCGI
Require all granted
</Directory>

error.log:
[Mon Feb 12 10:53:49.909534 2018] [core:info] [pid 50913] [client
xxx.xxx.xxx.xxx:57022] AH00128: File does not exist:
/usr/vhosts/example2.com/htdocs/myapp

ls -ld wsgi-scripts
drwxr-xr-x  2 www  www  512 Feb 11 16:52 wsgi-scripts//

ls -l myapp.wsgi
-rwxr-xr-x  1 www  www  382 Feb 11 16:30 myapp.wsgi*

myapp.wsgi
#-*- coding: utf-8 -*-
def wsgi_app(environ, start_response):
    import sys
    output = sys.version.encode('utf8')
    status = '200 OK'
    headers = [('Content-type', 'text/plain'),
               ('Content-Length', str(len(output)))]
    start_response(status, headers)
    yield output

# mod_wsgi need the *application* variable to serve our small app
application = wsgi_app


On 2/12/18, Frank Gingras <thumbs@apache.org> wrote:
> We're going to need a tad more information to help you. Error log entries
> (on 2.4, you might need to bump the log level for 404 errors), and the
> relevant vhost configuration.
>
> apachectl -S wouldn't hurt either.
>
> On Mon, Feb 12, 2018 at 10:21 AM, David Mehler <dave.mehler@gmail.com>
> wrote:
>
>> Hello,
>>
>> Thank you. I've got mod_python uninstalled and mod_wsgi installed, and
>> apache restarted no problems. The issue is I'm not getting python
>> scripts working, I keep getting a 404.
>>
>> Thanks.
>> Dave.
>>
>>
>> On 2/11/18, Frank Gingras <thumbs@apache.org> wrote:
>> > You should use mod_wsgi instead. The last release of mod_python is over
>> > three years old.
>> >
>> > On Sun, Feb 11, 2018 at 2:41 PM, David Mehler <dave.mehler@gmail.com>
>> > wrote:
>> >
>> >> Hello,
>> >>
>> >> I'm trying to get mod python 3.5 working with apache 2.4. I keep
>> >> getting an error on the PythonHandler line. I've got python 3.5
>> >> installed, and mod_python 3.5 with apache 2.4, they are not talking to
>> >> each other.
>> >>
>> >> Any ideas?
>> >>
>> >> Thanks.
>> >> Dave.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> >> For additional commands, e-mail: users-help@httpd.apache.org
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message