Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A very basic WSGI application can look as follows:</p> <pre><code>def application(environ, start_response): start_response('200 OK', [('content-type', 'text/html')]) return ['Hello world!'] </code></pre> <p>Unfortunately, if you put this into helloworld.py on the server and then browse to URL/helloworld.py you will most likely see the code.</p> <p>In general you need to add very specific configuration options to the server (or to a server configuration file) to get it to serve your python 'application' correctly. Given you are using mod_wsgi on Apache 2, a configuration could look as follows:</p> <pre><code>&lt;VirtualHost *&gt; ServerName example.com WSGIScriptAlias /server/location/address /path/to/helloworld.py &lt;/VirtualHost&gt; </code></pre> <p>Where /server/location/address is the endpoint of the URL you have to browse to.</p> <p>This is because python WSGI catches all URLs passed to it, and pushes them to the same entry point (your application method/class). And from the information received in the parameters, the application must decide what page to return. </p> <p>Since this information is so application specific there 'should' be a way to configure it on the server, however I have yet to come across a web-hosting configuration panel that allows the configuration of Python applications. This generally means you have to contact the server administrators and have them configure it for you.</p> <p>However, in general, when you sign up for hosting the company generally has a page where they tell you exactly what is supported on their servers (generally: php, mysql) and how much space and bandwidth you are allowed. Thus if they do not list it on their site, it is highly likely they will not support it.</p> <p>To get around this you can instead buy a VPS (Virtual Private Server) and then configure it however you want.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload