Forums

Possible to change location of the wsgi config file?

Currently located in /var/www/usrname_pythonanywhere_com_wsgi.py

But if I wanted to rename or move, can I? Do I have access to configuring uWSGI or nginx?

Further, the configuration file has the from flask_app import app as application line which tells me uWSGI or nginx are setup to look in /home/mysite for the flask_app.py file. Can I also change where they look for this?

You cannot move or rename the file. The name and location of the file are how the web app knows which file goes with which web app.

The uWSGI and nginx configs are not editable by users.

The wsgi configuration file imports from wherever it's told to. If you want to import from somewhere else, change the sys.path to include that instead.

Is this true even for paid accounts?

That's right. Why do you want to rename it? Perhaps there's an easier way to achieve your goal.

I have a similar problem. I am a totla beginner and successfully cloned a repository I named 'test' INTO my pythonanywhere mysite directory. I tried updating the working directory, source code and the line where that is mentioned in the WSGI file to try and run that (home/myusername/mysite/test), but that throws an Internal Server error. The github tutorial on here does not say how to pull or clone my github repository into my web app (other than clone into a separate folder) and when my github code changes, I was unable to execute git pull on pythonanywhere.... I'm obviously lost and in disfunctionality...

If you're getting an internal server error, your error and server logs will contain tracebacks that you can use to work out what caused the error.