mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 03:32:40 +00:00
Add Nginx config for lob.li
The magic happens on the try_files. Nothing is super special about this
This commit is contained in:
parent
cacd80a024
commit
ce574e8a32
30
Server Configuration/lob.li - Nginx config
Normal file
30
Server Configuration/lob.li - Nginx config
Normal file
@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user