Comments (6)
Your config redirects everything ending with .php
to FPM. So when you request status.php
, FPM is called, it looks for a file named status.php
, can't find it, and returns a 404.
You need to set up your config so that non-existing .php URLs are sent to _router.php, like this:
location ~ \.php {
try_files $uri $uri/ /_router.php?$query_string;
...
This should be good like that.
from karadav.
All right
I've made some progress, it was the rewriting rules which are not correct. Now, the webUI is working, but I can't connect a client: Nextcloud, OwnCloud, desktop or mobile app (version tested on the home page of the project), no one will work. When I try to connect, every app say: "404 Not Found" at "GET https://karadav.example.com/status.php"
There is no status.php anywhere... What's wrong with my configuration ?
`
server {
server_name karadav.example.com;
root /usr/local/share/karadav/www;
index index.php;
access_log /var/log/nginx/karadav.access.log;
error_log /var/log/nginx/karadav.error.log;
charset utf-8;
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
if (!-e $request_filename){
rewrite ^(.*)$ /_router.php;
}
location ~ ^(.+.php)(.)$ {
try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+.php)(.)$;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/karadav.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/karadav.example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = karadav.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name karadav.example.com;
return 404; # managed by Certbot
}
`
Thanks for your help
from karadav.
I understand what you mean. But as I'me not an expert with Nginx, where should I put this line of code in my config file. I've tried to placed it just before the fpm part, but with no success :-(
from karadav.
Replace your try_files line in the php block by the one I provided.
from karadav.
I am closing this issue as it is a server configuration issue on your side.
from karadav.
👍
from karadav.
Related Issues (20)
- CORS issues with reverse-proxy HOT 2
- Enable fail2ban by logging failed requests HOT 2
- Installation HOT 1
- the last nexcloud cliend from f-droid crashes HOT 6
- Karadav: Option to use shared directories between users HOT 1
- docker-compose.yml HOT 3
- After update to 0.4.0 no access to web file manager, only "Invalid URL" HOT 16
- Blank page on dietpi bookworm. HOT 3
- Ah right sorry, was probably the wrong link. But there is definitly something that prevents the Android app to recognize my Karadav server, while normal WebDAV used to work fine. HOT 6
- Empty "var" folder in each user directory HOT 2
- Nextcloud client not work HOT 1
- Server replied "413 Request Entity Too Large" to PUT with Nextcloud apps on upload HOT 3
- is it possible to add X-Accel-Redirect support HOT 1
- there will be a dir name by initial account (here are "demo") left to clean if change initial usename to another HOT 1
- owncloud/nextcloud clients doesnt work if installed in sub-directory HOT 6
- 401 Error | WebDAV HOT 2
- Missing SQLite3.php in lib folder HOT 4
- Mirrored folder structure on SSD HOT 2
- Problem with latest version and Docker: symlink to php binary missing HOT 1
- Files larger than 10mb fail to upload with Nextcloud app (403 error) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karadav.