1
0
mirror of https://github.com/gamaio/lobli.git synced 2024-12-22 19:52:40 +00:00
lobli/Server Configuration/lob.li - Nginx config
alopexc0de ce574e8a32
Add Nginx config for lob.li
The magic happens on the try_files. Nothing is super special about this
2014-08-15 19:58:13 -04:00

31 lines
982 B
Plaintext

server { # Lob.li
listen 80;
server_name lob.li;
access_log /home/www/log/short.access.log;
error_log /home/www/log/short.error.log;
root /home/www/lob.li/wroot/;
index index.php;
location / { try_files $uri $uri/ /index.php?$uri; }
# Ignore robots and favicon and deny all .ht* files
location = /robots.txt { log_not_found off; access_log off; }
location = /favicon.ico { log_not_found off; access_log off; }
location ~ /\.ht { deny all; }
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/tmp/php.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server { # Lob.li dynamic subdomain thing
server_name "~^(?<subdomain>.+)\.lob\.li$";
rewrite ^/(.*?)/?$ http://lob.li/$subdomain;
}