Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2244

[3.3.x] Support Forum • Re: [split] "forgot password" URL /user/forgot_password returns 404 response code

$
0
0
I found right config.
Looks like nginx/1.26.2 behaves differently from previous versions

So finally, this is what I have working for my nginx/1.26.2 and phpBB 3.3.14 :)
Shortly, no rewrites: try_files $uri $uri/ /app.php$is_args$args;

This is my /etc/nginx/forum.conf file

Code:

    listen        443 ssl;    http2 on;    index  index.php;    # add Strict-Transport-Security to prevent man in the middle attacks    add_header Strict-Transport-Security "max-age=63072000" always;    access_log  /var/log/nginx/forum.access.log  main;    ssl_certificate /etc/letsencrypt/live/myforum/fullchain.pem; # managed by Certbot    ssl_certificate_key /etc/letsencrypt/live/myforum/privkey.pem; # managed by Certbot    location = /favicon.ico {      log_not_found off;      access_log off;    }    location = /robots.txt {      allow all;      log_not_found off;      access_log off;    }    # redirect server error pages to the static page /50x.html    error_page   500 502 503 504  /50x.html;    location / {      try_files $uri $uri/ /app.php$is_args$args;      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000      location ~ \.php$ {        include fastcgi.conf;        fastcgi_split_path_info ^(.+\.php)(/.*)$;        fastcgi_param PATH_INFO $fastcgi_path_info;        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;        fastcgi_param DOCUMENT_ROOT $realpath_root;        try_files $uri $uri/ /app.php$is_args$args;        #fastcgi_intercept_errors on;        fastcgi_pass   127.0.0.1:9000;      }      # Deny access to internal phpbb files.      location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {        deny all;        internal;      }    }    #Correctly pass scripts for installer    location /install/ {      try_files $uri $uri/ /install/app.php$is_args$args;      location ~ \.php$ {        include fastcgi.conf;        fastcgi_split_path_info ^(.+\.php)(/.*)$;        fastcgi_param PATH_INFO $fastcgi_path_info;        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;        fastcgi_param DOCUMENT_ROOT $realpath_root;        try_files $uri $uri/ /install/app.php$is_args$args;        #fastcgi_intercept_errors on;        fastcgi_pass   127.0.0.1:9000;      }    }

Statistics: Posted by Vaga — Sun Feb 02, 2025 11:31 pm



Viewing all articles
Browse latest Browse all 2244

Trending Articles