Last active
February 24, 2017 11:31
-
-
Save tech-nova/e48909c6dc36367753bbbf99fb87616a to your computer and use it in GitHub Desktop.
Configuration de nginx pour seenthis
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
# Les autres redirections sont gerees par default.conf | |
server { | |
listen 8080; | |
server_name seenthis.net; | |
access_log /var/www/seenthis.net/log/access.log combined buffer=512k flush=60m; | |
error_log /var/www/seenthis.net/log/error.log crit; | |
root /var/www/seenthis.net/public_html; | |
location ~ ^/(tmp|config)/{ | |
deny all; | |
} | |
location ~ ^/robots\.txt$ { | |
access_log off; | |
try_files $uri /spip.php?page=robots.txt; | |
} | |
location ~ ^/sitemap\.xml$ { | |
access_log off; | |
try_files $uri /spip.php?page=sitemap.xml; | |
} | |
location ~ ^/favicon\.ico$ { | |
access_log off; | |
try_files $uri /spip.php?page=favicon.ico; | |
} | |
location ~ ^/message/([0-9]+)$ { | |
rewrite ^/message/([0-9]+)$ /spip.php?page=message&id_me=$1 last; | |
} | |
location ~ ^/sites/([0-9]+)$ { | |
rewrite ^/sites/([0-9]+)$ /spip.php?page=site&id_syndic=$1 last; | |
} | |
location ~ ^/people/?$ { | |
rewrite ^/people/?$ /spip.php?page=people last; | |
} | |
location ~ ^/recherche/?$ { | |
rewrite ^/recherche/?$ /spip.php?page=sphinx last; | |
} | |
location ~ ^/li/ { | |
rewrite ^/li/(.*)$ /index.php?action=seenli&me=$1 last; | |
} | |
location ~ ^/tag/ { | |
rewrite ^/(tag/.*)$ /spip.php last; | |
} | |
location ~ ^/tags/?$ { | |
rewrite ^/tags/?$ /spip.php?page=tags last; | |
rewrite ^/(tags/.*)\$$ /$1?page=mot_fin last; | |
rewrite ^/(tags/.*)\*$ /$1?page=mot_flou last; | |
} | |
location ~ ^/api/ { | |
rewrite ^/(api/messages.*)$ /index.php?action=api last; | |
rewrite ^/(api/people.*)$ /index.php?action=api_auteur last; | |
rewrite ^/api/url/(.*)$ /index.php?action=api_url&code=$1 last; | |
} | |
location / { | |
index index.php spip.php; | |
try_files $uri $uri/ /spip.php?q=$uri&$args; | |
} | |
include /etc/nginx/conf/staticfiles.conf; | |
include /etc/nginx/conf/php5.conf; | |
include /etc/nginx/conf/drop.conf; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment