diff options
| author | Horus3 | 2014-03-11 23:34:20 +0100 |
|---|---|---|
| committer | Horus3 | 2014-03-11 23:34:20 +0100 |
| commit | ca3d504428d053e3c344cafdefc7f7836f39dd1c (patch) | |
| tree | ee60fa2b445f1e4da347ef992cd08886c231f691 /blob | |
| parent | 9ed369355660f41919e9eb0086e73c7589cd0dcf (diff) | |
| download | files.iamfabulous.de-ca3d504428d053e3c344cafdefc7f7836f39dd1c.tar.gz | |
nginx config with error handling
Diffstat (limited to 'blob')
| -rw-r--r-- | blob/database_schema | 2 | ||||
| -rw-r--r-- | blob/nginx_rewrite_rules | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/blob/database_schema b/blob/database_schema index ec4a649..01a8442 100644 --- a/blob/database_schema +++ b/blob/database_schema @@ -2,6 +2,6 @@ CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, name TEXT UIQUE, salt TEXT, password TEXT, email TEXT UNIQUE, invites INTEGER, senpai INTEGER, key TEXT, status INTEGER, register TEXT); -CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, parent INTEGER, owner INTEGER, name TEXT, folder TEXT, mime TEXT, size INTEGER, share TEXT, extra TEXT, FOREIGN KEY(owner) REFERENCES user(id)); +CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, parent INTEGER, owner INTEGER, name TEXT, folder TEXT, mime TEXT, size INTEGER, share TEXT, hash TEXT, FOREIGN KEY(owner) REFERENCES user(id)); CREATE TABLE IF NOT EXISTS log (id INTEGER PRIMARY KEY, user INTEGER, login TEXT, FOREIGN KEY(user) REFERENCES user(id)); diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules index 0b925f3..aded2ed 100644 --- a/blob/nginx_rewrite_rules +++ b/blob/nginx_rewrite_rules @@ -1,7 +1,10 @@ -location /robots.txt {} #stop rewriting the robots.txt +error_page 401 403 404 /httperror.php?e=40x; +error_page 500 502 504 /httperror.php?e=50x; -location /favicon.ico {} -location /static {} +location /robots.txt {} #stop rewriting the robots.txt + +location /favicon.ico {} +location /static {} #location ~* ^/.+[^/].+\.css {} #location ~* ^/.+[^/].+\.png {} @@ -27,7 +30,7 @@ location ~* ^/?user(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ { rewrite ^/?user(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=user&arguments=$1 last; } -location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all +#location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all location / { rewrite ^/([0-9a-zA-Z-_]+)/(.*) /index.php?name=$1&folder=$2 last; |
