bernie
Member
Hi, eine TYPO3 Website funktioniert mit untenstehenden Direktiven bestens ohne www. Mit www spuckt der Server einen 500er Error aus. Das Fehlerprotokoll bleibt aber leer? Kann mir jemand auf die Sprünge helfen? DNS Einträge www besteht. Server name im vhost File ist korrekt mit und ohne www.
Code:
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
location ~* \.(cur|ico|gif|png|jpe?g|css|js|swf|woff)((\?\d\d\d\d\d\d\d\d\d\d)|(\?s=\d\d\d\d\d\d\d\d\d\d))$ {
expires max;
log_not_found off;
}
location ~* \.(cur|ico|gif|png|jpe?g|css|js|swf|woff)(\?v\d\d?\.\d\d?\.\d\d?)$ {
expires max;
log_not_found off;
}
location ~* ^(/typo3/sysext|/typo3conf/ext).*\.(cur|ico|gif|png|jpe?g|css|js|swf|woff) {
expires max;
log_not_found off;
}
location = /clear.gif {
empty_gif;
expires max;
}
location ^~ /typo3/gfx {
expires max;
}
location ^~ /typo3temp/compressor {
expires max;
}
location ~* \.(sql|htaccess|htpasswd|tpl|html5|xhtml) {
deny all;
}
location / {
if ($query_string ~ ".+") {
return 405;
}
# pass requests from logged-in users to PHP
if ($http_cookie = 'nc_staticfilecache|be_typo_user' ) {
return 405;
} # pass POST requests to PHP
if ($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
if ($http_pragma = 'no-cache') {
return 405;
}
if ($http_cache_control = 'no-cache') {
return 405;
}
error_page 405 = @nocache;
# serve requested content from the cache if available, otherwise pass the request to PHP
try_files /typo3temp/tx_ncstaticfilecache/$host${request_uri}index.html @nocache;
}
location @nocache {
try_files $uri $uri/ /index.php?$args;
}
location ^~ /typo3temp/tx_ncstaticfilecache {
expires 43200;
charset utf-8;
}