Closed Skyline-007 closed 2 years ago
add to the config file, just like this:
# whichever is more appropriate
root /RUN_PATH;
server_name DOMAIN;
location / {
index index.html index.php;
try_files $uri $uri/ /nexus.php$is_args$args;
}
# Filament
location ^~ /filament {
try_files $uri $uri/ /nexus.php$is_args$args;
}
location ^~ /api/announce {
rewrite /api/announce(.*) /announce.php$1 last;
}
location ^~ /api/scrape {
rewrite /api/scrape(.*) /scrape.php$1 last;
}
location ~ \.php {
# whichever is true
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
access_log /var/log/nginx/DOMAIN.access.log;
error_log /var/log/nginx/DOMAIN.error.log;
@xiaomlove Thank you for your reply.
And thank you for telling me where to put the lines.
But what exactly is this addition of lines for ?
/api/announce
does not perform as well as /announce.php
, this is to forward requests from /api/announce
to /announce.php
to come in and respond.
Ok
Thank you for your reply
Hello
I tried to understand your tutorial but google translate does not translate it well for me.
Here is the link : https://nexusphp.org/2022/07/18/tracker-url-recommend-to-use-old-announce-php/
Can you be more specific on the tutorial what it is for ?
I don't understand where to make the changes can you tell me which file to change ?
location ^~ /api/announce { rewrite /api/announce(.*) /announce.php$1 last; }
location ^~ /api/scrape { rewrite /api/scrape(.*) /scrape.php$1 last; }
Do you need to add the lines in the configure the web server file ? ( https://doc.nexusphp.org/en/installation.html#configure-the-web-server )
server {
}
Or is it another file to edit ?
Thank you in advance for your answer
Best regards
Skyline-007