Shift htaccess to README
parent
6e2e5ffa00
commit
7751792942
26
README.md
26
README.md
|
@ -274,8 +274,30 @@ For this, you need to make sure your host allows python script execution. This
|
|||
method uses HTTP calls to fetch the RSS feeds, which will be handled through
|
||||
`mod_cgi` for example on Apache severs.
|
||||
|
||||
Please pay attention to `main.py` permissions for it to be executable. Also
|
||||
ensure that the provided `/www/.htaccess` works well with your server.
|
||||
Please pay attention to `main.py` permissions for it to be executable. See below
|
||||
some tips for the `.htaccess` file.
|
||||
|
||||
```htaccess
|
||||
Options -Indexes
|
||||
|
||||
ErrorDocument 404 /cgi/main.py
|
||||
|
||||
# Turn debug on for all requests
|
||||
SetEnv DEBUG 1
|
||||
|
||||
# Turn debug on for requests with :debug in the url
|
||||
SetEnvIf Request_URI :debug DEBUG=1
|
||||
|
||||
<Files ~ "\.(py|pyc|db|log)$">
|
||||
deny from all
|
||||
</Files>
|
||||
|
||||
<Files main.py>
|
||||
allow from all
|
||||
AddHandler cgi-script .py
|
||||
Options +ExecCGI
|
||||
</Files>
|
||||
```
|
||||
|
||||
### As a CLI application
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -30,7 +30,6 @@ setup(
|
|||
data_files = [
|
||||
('share/' + package_name, ['README.md', 'LICENSE']),
|
||||
('share/' + package_name + '/www', glob('www/*.*')),
|
||||
('share/' + package_name + '/www/cgi', [])
|
||||
],
|
||||
entry_points = {
|
||||
'console_scripts': [package_name + '=' + package_name + '.__main__:main']
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
Options -Indexes
|
||||
|
||||
ErrorDocument 403 "Access forbidden"
|
||||
ErrorDocument 404 /cgi/main.py
|
||||
ErrorDocument 500 "A very nasty bug found his way onto this very server"
|
||||
|
||||
# Uncomment below line to turn debug on for all requests
|
||||
#SetEnv DEBUG 1
|
||||
|
||||
# Uncomment below line to turn debug on for requests with :debug in the url
|
||||
#SetEnvIf Request_URI :debug DEBUG=1
|
||||
|
||||
<Files ~ "\.(py|pyc|db|log)$">
|
||||
deny from all
|
||||
</Files>
|
|
@ -1,9 +0,0 @@
|
|||
order allow,deny
|
||||
|
||||
deny from all
|
||||
|
||||
<Files main.py>
|
||||
allow from all
|
||||
AddHandler cgi-script .py
|
||||
Options +ExecCGI
|
||||
</Files>
|
Loading…
Reference in New Issue