March 12, 2016 02:35AM
reaman Wrote:
-------------------------------------------------------
> I come to you because I am facing a problem with the customization of
> the 401 error page in fact I use Nginx and rutorrent, I proceeded as
> follows:
>
> I create a folder named "error_pages" I placed in the /var/www/
> then I created my pages 400.html 401.html 403.html 404.html 503.html
> 50x.html
>
> I created the page “error_pages.conf”
> (/etc/nginx/conf.d/error_pages.conf) and I placed the code below
>
> error_page 400 /error_pages/400.html;
> location = /400.html {
> root /var/www/;
> }
>
> error_page 401 /error_pages/401.html;
> location = /401.html {
> root /var/www/;
> auth_basic off;
> allow all;
> }
>
> error_page 403 /error_pages/403.html;
> location = /403.html {
> root /var/www/;
> allow all;
> }
>
> error_page 404 /error_pages/404.html;
> location = /404.html {
> root /var/www/;
> auth_basic off;
> internal;
> }
>
> error_page 503 /error_pages/503.html;
> error_page 500 501 502 504 /error_pages/50x.html;
> location ^~ /error_pages {
> root /var/www/;
> internal;
> }
>
> Then in the file "rutorrent.conf" located in the
> "/etc/nginx/sites-enabled" the following code:
>
> server {
> listen 443 default_server ssl http2;
> …..
> include /etc/nginx/conf.d/error_pages.conf;
> .….
>
> I restart nginx services.
>
> But obviously my custom error page is not displayed in place of the
> original one and I do not see why.
>
> Can you help me ?
>
> Thank you
Subject Author Posted

Problem for play my custom pages error 401

reaman March 12, 2016 02:31AM

Re: Problem for play my custom pages error 401

reaman March 12, 2016 02:35AM

Re: Problem for play my custom pages error 401

reaman March 12, 2016 02:45AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready