ISPconfig Site: 'environment variables' & python installation?

Discussion in 'ISPConfig 3 Priority Support' started by peterpetr, Sep 17, 2025 at 8:40 AM.

  1. peterpetr

    peterpetr Member HowtoForge Supporter

    I have a new ISPconfig system on Ubuntu 24.04 Server.
    I have created a new Site and installed WordPress.
    I want to give a Python app access to the MariaDb database that's used by WordPress on this Site.
    For the Python app, I have to set 3 environment variables.
    Question #1: How do I set permanent environment variables only for the new Site (so Python can access them)?
    Question #2: How do I install or enable Python version 3.8 only for this new Site?
    Question #3: The Python program will need to serve pages via the same NGINX web server that WordPress is using. Below I show the snippets I'm using with WordPress.
    The Python app will be uploading some large CSV files to import into the MariaDb database for using with it's own tables. Some of the files to upload might be 2Gb in size. (alternatively, I can upload the files to a location in the Site using FTP if that's better?)
    Do any changes need to be made to support the Python 3.8 app web pages being available via the internet?
    NGINX Directives:
    client_max_body_size 155M;
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;
    }​

    Your help would be much appreciated. Thanks you.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I do not use Python web apps, so I cannot give you any configuration for that.
     
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    What do you even mean by this? Is this "python app" running a webserver on a specific port and you want NGINX as a reverse proxy here?

    Why don't you run your python app somewhere else and just grant access to the specific database in ISPConfig and it can do whatever it does?
     

Share This Page