Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Nginx rewrite rules for Sendy (http://sendy.co)
- # PHP-FPM
- #
- # http://sendy.co/forum/discussion/142/nginx-rewrite-rule
- #
- server {
- listen 80;
- server_name sendy.junon.be www.sendy.junon.be;
- access_log /usr/local/apache/domlogs/sendy.junon.be-bytes_log bytes_log;
- access_log /usr/local/apache/domlogs/sendy.junon.be combined;
- error_log /var/log/nginx/vhost-error_log warn;
- index index.php index.html;
- root /home/sendy/public_html;
- location = / {
- index index.php;
- }
- location / {
- if (!-f $request_filename){
- rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
- }
- }
- location /l/ {
- rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
- }
- location /t/ {
- rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
- }
- location /w/ {
- rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
- }
- location /unsubscribe/ {
- rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
- }
- location /subscribe/ {
- rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
- }
- location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php {
- fastcgi_index index.php;
- include fastcgi_params;
- keepalive_timeout 0;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass 127.0.0.1:9000;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement