-
Notifications
You must be signed in to change notification settings - Fork 251
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
1 parent
02f980f
commit 92a0787
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 @@ | ||
--- | ||
layout: default | ||
title: CGI deployment on Apache | ||
--- | ||
|
||
# CGI deployment on Apache | ||
|
||
Here are the simple steps needed to create and run an web.py application. | ||
|
||
* Install web.py and flups | ||
|
||
* Create the application as documented | ||
|
||
if __name__ == "__main__": | ||
web.run(urls, globals()) | ||
|
||
For our example, let it be named `app.py`, located in `/www/app` and we need it accessible as `http://server/app/app.py`. | ||
|
||
* Configure Apache (version 2.2 in this example) | ||
|
||
ScriptAlias /app "/www/app/" | ||
<Directory "/www/app/"> | ||
Options +ExecCGI +FollowSymLinks | ||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
|
||
That's it. Your application is accessible via `http://server/app/app.py/`. Additional URLs handled by the application are added to the end of the URL, for examples `http://server/app/app.py/myurl`. |