Created
July 7, 2013 14:19
-
-
Save JokerQyou/5943622 to your computer and use it in GitHub Desktop.
Nginx configuration for my selfoss site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#涉及到真实的服务器地址一律以 myselfoss.com 代替 | |
server { | |
listen 80; | |
server_name myselfoss.com; | |
index index.php index.html index.htm; | |
root /home/wwwroot/rss; | |
error_log /var/log/nginx/rss.error.log; | |
access_log off; | |
location ~ \.php$ | |
{ | |
fastcgi_pass unix:/tmp/php-cgi.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | |
include fastcgi_params; | |
#include fcgi.conf; | |
} | |
location ~* \ (gif|jpg|png) { | |
expires 30d; | |
} | |
location ~ ^/favicons/.*$ { | |
try_files $uri /data/$uri; | |
} | |
location ~* ^/(data\/logs|data\/sqlite|config\.ini|\.ht) { | |
deny all; | |
} | |
location / { | |
index index.php index.html index.htm; | |
try_files $uri /public/$uri /index.php$is_args$args; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment