JustPaste.it

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/ccc.mv/before/*;
server {
listen 80;
listen 443 ssl;
server_name ccc.mv;
root /home/forge/new.ccc.mv/public;
# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/ccc.mv/certificate.pem;
ssl_certificate_key /etc/nginx/ssl/ccc.mv/key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
index index.html index.htm index.php;
charset utf-8;
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/vvv.mv/server/*;
# location /c {
# try_files $uri $uri/ /map-url.php$is_args$args;
# }
# location /{
# try_files $uri $uri/ /f/index.php?id=176002
# }

location /f {
rewrite ^/f/([a-zA-Z0-9]+)$ /f/?id=$1;
rewrite ^/f/([a-zA-Z0-9]+)/$ /f/?id=$1;
try_files $uri $uri/ $query_string;
}

location /tag {
# url/tag/AFC2014
rewrite ^/tag/(.*)/$ /f/tag.php?call=$1 last;
rewrite ^/tag/(.*)$ /f/tag.php?call=$1 last;
}

location /category {
# maintain order
#url/category/Entertainment/bollywood.html
rewrite ^/category/(\w*)/(.*).html$ /f/archive.php?call=$1&cat=$2 last;
#url/category/Entertainment/
rewrite ^/category/(\w*)/$ /f/archive.php?call=$1 last;
rewrite ^/category/(\w*)$ /f/archive.php?call=$1 last;
}

location / {
#rewrite ^/news-(\d*).html$ /f/news.php?id=$1 last;
rewrite ^/(\d*)/$ /f/news.php?id=$1 last;
rewrite ^/(\d*)$ /f/news.php?id=$1 last;
# url/news-76713.html
rewrite (?i)^/(\w*).html$ /f/vvv.php?call=$1 last;
# url/Sports.html
try_files $uri $uri/ $query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/vvv.mv-error.log error;
# error_page 404 /index.php;

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
# fastcgi_index index.php;
}

location ~ /\.ht {
deny all;
}

}

server {
listen 80;
server_name ccc.mv;
return 301 $scheme://ccc.mv$request_uri;
}

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/ccc.mv/after/*;