nginx/include/wordpress_common.conf

35 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

# Basis-Konfiguration für Wordpress
client_max_body_size 16M;
root /var/www/wordpress;
index index.php index.html index.htm;
# Don't allow to get framed by sites that aren't on the same domain
add_header X-Frame-Options SAMEORIGIN;
# Tell clients never to use http or self-signed (!) certificates
# There's no way to bypass this option after it has been cached!
add_header Strict-Transport-Security max-age=31536000;
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/wordpress$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /var/www/default$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}