- Offizieller Beitrag
Will man im WSC3 die SEO aktivieren und nutzt dazu Plesk und nginx kann es immer mal wider zu Fehlern kommen. Hier zeigen wir wie es ganz einfach umsetzbar ist.
- ACP -> Konfiguration -> Allgemein -> Linkumschreibung aktivieren
- Plesk -> Einstellungen für Apache & nginx
- Proxymodus deaktivieren
- Zusätzliche nginx-Anweisungen
- Service nginx restart / reload
- Cache leeren im ACP & ggf. Browser
Weitere Anwendungen können in Zeile 7 erweitert werden, zB. |filebase/ usw.
Code: Zusätzliche nginx-Anweisungen
if ($scheme !~* ^https ){
rewrite ^ https://www.domain.com$request_uri? permanent;
}
if (!-e $request_filename)
{
rewrite ^/(cms/|wcf/)?([^.]+)$ /$1index.php?$2 last;
}
proxy_connect_timeout 1200s;
proxy_send_timeout 1200s;
fastcgi_send_timeout 1200s;
fastcgi_read_timeout 1200s;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
client_max_body_size 1024m;
location ~ .php$ {
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
}
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+AESGCM+AES128:EECDH+AESGCM+AES256:EECDH+CHACHA20:EDH+AESGCM+AES128:EDH+AESGCM+AES256:EDH+CHACHA20:EECDH+SHA256+AES128:EECDH+SHA384+AES256:EDH+SHA256+AES128:EDH+SHA256+AES256:EECDH+SHA1+AES128:EECDH+SHA1+AES256:EDH+SHA1+AES128:EDH+SHA1+AES256:EECDH+HIGH:EDH+HIGH:AESGCM+AES128:AESGCM+AES256:CHACHA20:SHA256+AES128:SHA256+AES256:SHA1+AES128:SHA1+AES256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!KRB5:!aECDH:!EDH+3DES;
ssl_buffer_size 8k;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
resolver 8.8.8.8;
add_header P3P 'policyref="/w3c/p3p.xml", CP="IDC DSP COR DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT", CP="CAO PSA OUR"';
add_header Strict-Transport-Security "max-age=; includeSubdomains; ";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Last-Modified $date_gmt;
etag on;
gzip on;
gzip_vary on;
gzip_types application/xml+rss;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_min_length 1000;
gzip_proxied any;
gzip_types application/ecmascript;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/pdf;
gzip_types application/postscript;
gzip_types application/x-javascript;
gzip_types application/x-perl;
gzip_types application/x-httpd-cgi;
gzip_types application/xhtml+xml;
gzip_types application/vnd.ms-fontobject;
gzip_types application/ttf;
gzip_types application/x-ttf;
gzip_types application/otf;
gzip_types application/x-otf;
gzip_types application/truetype;
gzip_types application/opentype;
gzip_types application/x-opentype;
gzip_types application/woff;
gzip_types application/eot;
gzip_types application/font;
gzip_types application/font-woff woff;
gzip_types application/font-sfnt;
gzip_types image/svg+xml;
gzip_types image/gif;
gzip_types image/jpeg;
gzip_types image/x-icon;
gzip_types text/plain;
gzip_types text/richtext;
gzip_types text/css;
gzip_types text/csv;
gzip_types text/javascript;
gzip_types text/xml;
gzip_types text/x-script;
gzip_types text/x-component;
gzip_types text/x-java-source;
gzip_types font/ttf;
gzip_types font/otf;
gzip_types font/x-woff;
gzip_types multipart/bag;
gzip_types multipart/mixed;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
## Feed
location ~* \.(rss|atom)$ {
add_header Pragma public;
add_header Cache-Control "max-age=, public, must-revalidate, proxy-revalidate";
try_files $uri @fallback;
}
## Media: images, icons, video, audio, HTC
location ~* \.(jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|css|js|bmp|pict|csv|doc|pdf|pls|ppt|ti|tiff|eps|ejs|swf|midi|mid|tt|eot|wof|otf|webp|docx|xlsx|xls|pptx|ps|class|jar)$ {
add_header Pragma public;
add_header Cache-Control "max-age=, public, must-revalidate, proxy-revalidate";
try_files $uri @fallback;
}
## CSS and Javascript
location ~* \.(css|js)$ {
add_header Pragma public;
add_header Cache-Control "max-age=, public, must-revalidate, proxy-revalidate";
try_files $uri @fallback;
}
## Add mime-type for compressed js files
location ~* \.js\.gzip {
types {
text/javascript gzip;
}
}
## Add mime-type for compressed css files
location ~* \.css\.gzip {
types {
text/css css;
}
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
Alles anzeigen