I use Nginx with php-fpm on my server to run my Wordpress blog.
When someone share my website on Facebook, some parameters are added by Facebook and the URL looks like :
I checked my logs and I have a "414 Request-URI Too Long" with this request. I try to add large_client_header_buffers in my Nginx config file but without result.
However, if you only use the normal URL (https://jp.rlauzier.com/2013/07/les-courriels-et-la-securite-quelques-notions-a-savoir/), everything work correctly.
Here's my configuration file:
server {
listen 443;
server_name jp.rlauzier.com;
ssl on;
ssl_certificate /etc/nginx/ssl/jp.rlauzier.com.crt;
ssl_certificate_key /etc/nginx/ssl/jp.rlauzier.com.key;
include /var/www/jp.rlauzier.com/public_html/nginx.conf;
location / {
root /var/www/jp.rlauzier.com/public_html/;
index index.php index.html index.htm;
if ($request_uri ~* \.(ico|css|js|gif|jpe?g|png)$) {
expires max;
break;
}
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/jp.rlauzier.com/public_html/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /(\.|wp-config.php|nginx.conf|readme.html|license.txt) {
return 404;
}
}
server {
listen 80;
server_name jp.rlauzier.com rlauzier.com;
rewrite ^ https://jp.rlauzier.com$request_uri? permanent;
}