mirror of https://github.com/pikami/palm-paste.git
Added nginx configs
This commit is contained in:
parent
cbb9b9964e
commit
d5ad274f01
|
@ -18,7 +18,8 @@ So we'll just assume you already have them all running well.
|
|||
2. Create a user and database for palm-paste
|
||||
3. Take the 'palm-paste.sql' and import it to your database.
|
||||
4. Edit configuration settings in config/config.php
|
||||
5. Change the "RewriteBase" setting in ".htaccess" file to the root of your palm-paste installation
|
||||
5. (For apache users) Change the "RewriteBase" setting in ".htaccess" file to the root of your palm-paste installation
|
||||
5. (For nginx users) add the block from nginx_cfg.txt to your nginx server config, replace all occurrences of "paste" with the root of your palm-paste installation
|
||||
6. Done!
|
||||
|
||||
* To ensure that pastes with an expiration set get cleaned up, define the cron key in the config and set up a cronjob, for example:
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# replace all occurrences of "paste" with the root of your palm-paste installation
|
||||
location /paste {
|
||||
if ( $uri !~ ^/paste/(index\.php|css|js|robots\.txt|favicon\.ico|) ) {
|
||||
rewrite ^/paste/u/(.*)$ /paste/index.php?user=$1? last;
|
||||
rewrite ^/paste/(.*)$ /paste/index.php?page=$1? last;
|
||||
}
|
||||
if ( $uri ~* ^/paste/u/(css|js) ) {
|
||||
rewrite ^/paste/u/(.*)$ /paste/u/$1? last;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue