104.174.250.125 - - [06/Apr/2020:21:49:18 +0000] "GET /api/v1/oauth.json?_=1586209757997 HTTP/2.0" 200 443521 "https://board/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"104.174.250.125 - - [06/Apr/2020:21:49:19 +0000] "GET /api/v1/oauth.json?_=1586209758858 HTTP/2.0" 200 443521 "https://board/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"104.174.250.125 - - [06/Apr/2020:21:49:20 +0000] "GET /api/v1/oauth.json?_=1586209759712 HTTP/2.0" 200 443521 "https://board/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
server { #listen 80 default_server; listen 443 ssl http2; # we enable HTTP/2 here (previously SPDY) server_name board.awaca.be; # this domain must match Common Name (CN) in the SSL certificate
root /usr/local/www/board; index index.html index.php;
gzip on; gzip_disable "msie6";
gzip_comp_level 6; # gzip_comp_level 9; gzip_min_length 1100; gzip_buffers 16 8k; gzip_proxied any; # gzip_http_version 1.1; gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
client_max_body_size 300M;
rewrite ^/oauth/authorize$ /server/php/authorize.php last; rewrite ^/oauth_callback/([a-zA-Z0-9_\.]*)/([a-zA-Z0-9_\.]*)\$ /server/php/oauth_callback.php?plugin=\$1&code=\$2 last; rewrite ^/download/([0-9]*)/([a-zA-Z0-9_\.]*)\$ /server/php/download.php?id=\$1&hash=\$2 last; rewrite ^/ical/([0-9]*)/([0-9]*)/([a-z0-9]*).ics\$ /server/php/ical.php?board_id=\$1&user_id=\$2&hash=\$3 last; rewrite ^/api/(.*)$ /server/php/R/r.php?_url=\$1&\$args last; rewrite ^/api_explorer/api-docs/$ /client/api_explorer/api-docs/index.php last;
location / { root /usr/local/www/board/client; }
location /server/ { root /usr/local/www/board; }
location ~ \.php\$ { try_files \$uri =404; include fastcgi_params; fastcgi_index index.php; fastcgi_pass php_workers; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; fastcgi_param PHP_VALUE "upload_max_filesize=80M \n post_max_size=120M \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M"; }
location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico) {
root /usr/local/www/board/client; if (-f \$request_filename) { break; } rewrite ^/img/([a-zA-Z_]*)/([a-zA-Z_]*)/([a-zA-Z0-9_\.]*)\$ /server/php/image.php?size=\$1&model=\$2&filename=\$3 last; add_header Cache-Control public; add_header Cache-Control must-revalidate; expires 7d; }}
Hi ,
thanks for the answer.
==> /var/log/nginx/error.log <==2020/04/07 23:35:27 [error] 55275#101507: *865 open() "/usr/local/www/board/client/server/php/R/r.php" failed (2: No such file or directory), client: 104.174.250.125, server: board, request: "GET /api/v1/oauth.json?_=1586302527606 HTTP/2.0", host: "board", referrer: "https://board"
==> /var/log/nginx/access.log <==104.174.250.125 - - [07/Apr/2020:23:35:27 +0000] "GET /api/v1/oauth.json?_=1586302527606 HTTP/2.0" 404 146 "https://board" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15"
Enter code here... location / {
Hi,i have removed the block. That was the output of it.The location of the restya app is /usr/local/www/board
I also tried copying the diagnostics.php file to /client/ but it seems the php is downloaded instead of executed.Any hints?FreeBSD 12.1Nginx 1.16.1