-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# run from env | ||
|
||
|
||
``` | ||
sudo apt install python3-venv # Install venv module if not already installed | ||
python3 -m venv /path/to/your/env # Replace /path/to/your/env with your desired path | ||
source /path/to/your/env/bin/activate | ||
``` | ||
|
||
``` | ||
<VirtualHost *:80> | ||
ServerName your-domain.com | ||
ServerAdmin [email protected] | ||
|
||
WSGIDaemonProcess myapp python-home=/path/to/your/env | ||
WSGIProcessGroup myapp | ||
|
||
WSGIScriptAlias / /var/www/html/myscript.py | ||
|
||
<Directory /var/www/html> | ||
Require all granted | ||
</Directory> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
</VirtualHost> | ||
``` | ||
|