私の書き直しが動作します。NGINX - 書き換えとエラー404
一方、私の404エラーリダイレクトはもう動作しません。
私の.phpリンクに追加すると、ファイルがありません。
同様に、私は私のリンクに管理者を置くと、それは私にオープニング、メニューとcopiryghtを入れます。
例私がhttps://mon.domain.com/admin/を置くと、404エラーページが表示されている間にページが読み込まれます。ページは、私は私の誤りを越え404
を来るどのような場合には、あなたが私を助けることができると存在しない場合、私は、希望何
?ここで
はnginxのの設定です:
upstream www {
server unix:/var/run/php5-fpm.sock;
}
server {
listen 80 default;
server_name no-impact.eu;
return 301 https://my.domain.com;
}
server {
listen 443 ssl;
server_name my.domain.com;
fastcgi_param HTTPS on;
ssl on;
ssl_certificate /etc/letsencrypt/live/my.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root /var/www/my.domain.com/;
index index.php;
error_page 400 401 402 403 404 500 502 503 504 /error.html;
location /.well-known/acme-challenge {
root /var/www/letsencrypt;
}
location = /error.html {
root /var/www/my.domain.com/error/;
index index.html;
}
location/{
index index.php index.html;
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/([\w-]+)-page-(\d+)$ /index.php?id=$1&page=$2 last;
rewrite ^/([\w-]+)-(\d+)$ /index.php?id=$1&id_tutoriel=$2 last;
rewrite ^/(.*)$ /index.php?id=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
'root /var/www/my.domain.com/;'をサーバブロック内の 'location/{...}'ブロックに移動してみてください。 – AaronDanielson
私は試してみましたが、動作するページのどこにでもエラーが表示されます –