[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi I am new to the list . 

I have an issue which I believe to be an apache configuration issue 

When I POST a file with CURL or android app I get 404 error however the path exists. 

As I understand It i do not need a handler to POST and the file should appear. I am trying to replicfate AirScan/eSCL Protocol

I have tried numerous solutions from modifying .htaccess, php.ini and apache2.conf.

Thanks in advance for any advice . More info follows

Currently I have

apache2.conf
<Directory /var/www/>
  <IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME}.php -f
   RewriteRule (.*) $1.php [L]
   RewriteCond %{REQUEST_FILENAME}.xml -f
   RewriteRule (.*) $1.xml [L]
  </IfModule>
 Options FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>


There is also a virtual host 000-default.conf
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

.htaccess in /var/www/html
DirectorySlash Off
php.ini (upload_tmp_dir not sure to put full path or from web root. I have also read to put it in quotes)

file_uploads = On
upload_tmp_dir = /var/www/html/eSCL/ScanJobs 
Web root is /var/www/html I want to upload to /var/www/html/eSCL/ScanJobs Permissions for Scan jobs folder is 777 Owner www-data (appropriate for ubuntu)

Errors from 2 posts are 404 , one is CURL for testing , other is Mopria Android app for scanning.

CURL
curl -v -X POST -d @scansettings.xml  
http://localhost:80/eSCL/ScanJobs
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 80 (#0)
> POST /eSCL/ScanJobs HTTP/1.1
> Host: localhost
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 605
> Content-Type: application/x-www-form-urlencoded

* upload completely sent off: 605 out of 605 bytes
< HTTP/1.1 404 Not Found
< Date: Thu, 16 May 2019 17:14:32 GMT
< Server: Apache/2.4.18 (Ubuntu)
< Content-Length: 286
< Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /eSCL/ScanJobs was not found on this server. 
</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at localhost Port 80</address>
</body></html>
* Connection #0 to host localhost left intact
Apache log entry for above CURL request

127.0.0.1 - - [16/May/2019:12:14:32 -0500] "POST /eSCL/ScanJobs HTTP/1.1" 404 447 "-" "curl/7.47.0"
in Apache log using Mopria (including successful hits)

192.168.0.8 - - [16/May/2019:12:17:59 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 716 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:04 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:09 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:13 -0500] "GET /eSCL/ScannerCapabilities HTTP/1.1" 200 1389 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:13 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:16 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 716 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:20 -0500] "GET /eSCL/ScannerCapabilities HTTP/1.1" 200 1389 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:20 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:25 -0500] "POST /eSCL/ScanJobs HTTP/1.1" 404 506 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:25 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:30 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"
192.168.0.8 - - [16/May/2019:12:18:35 -0500] "GET /eSCL/ScannerStatus HTTP/1.1" 200 715 "-" "okhttp/3.9.1"

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux