With security in mind, what is the best practice for storing my main.py on a web server? For example, is it safe to place my main.py in /var/www/mysite.com/public_html or should I place it in /var/www/mysite.com.
I am a first time subscriber to a virtual private server and I am running Nginx as a reverse proxy to a Tornado web server. If you are not familiar with Tornado, main.py is the python file that starts my Tornado web application.
Below is an example of how I plan on organizing my files.
It's always better to keep things out of public_html unless you specifically need them there. I would recommend setting up a separate directory next to public_html for the application code:
/var/www/mysite.com/app/main.py
/var/www/mysite.com/public_html/*
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments