HTTP Copy: Difference between revisions
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Update Nov2022 HFT/HCP - A Docker Image and a Dockerfile is now available , see the Download section''' | |||
HTTP copy (HCP) is a small perl script which allows you to upload data through your Apache Server to disk. <br> | HTTP copy (HCP) is a small perl script which allows you to upload data through your Apache Server to disk. <br> | ||
The script has been tested on Debian 10 (Buster) but should work on other distros as well.<br> | The script has been tested on Debian 10 (Buster) but should work on other distros as well.<br> | ||
Line 15: | Line 18: | ||
my $uploadpath='/path/to/upload/'; | my $uploadpath='/path/to/upload/'; | ||
The server script is able to send syslog messages, if this is an option then the syslog module must | The server script is able to send syslog messages, if this is an option then the syslog module must be installed<br> | ||
using cpan, build-essential is needed to do this: | using cpan, build-essential is needed to do this: | ||
Line 68: | Line 71: | ||
{| style="width: 70%;" | {| style="width: 70%;" | ||
|style="width: | |style="width:40%; vertical-align: top;"| | ||
'''Download the script'''<br> | '''Download the script'''<br> | ||
[[File:Download.png|60px|link= | [[File:Download.png|60px|link=https://coolscript.org/download/scripts/hft.zip|Download]] | ||
<br> | |||
|style="width:90%; vertical-align: top;"| | |||
<br> | |||
|} | |||
{| style="width: 70%;" | |||
|style="width:40%; vertical-align: top;"| | |||
'''Download the Dockerfile'''<br> | |||
[[File:Download.png|60px|link=https://coolscript.org/download/docker/dockerfile.hft.tar.gz|Download]] | |||
<br> | |||
|style="width:90%; vertical-align: top;"| | |||
<br> | |||
|} | |||
{| style="width: 70%;" | |||
|style="width:40%; vertical-align: top;"| | |||
'''Download the Dockerimage to be used with docker-compose'''<br> | |||
[[File:Download.png|60px|link=https://coolscript.org/download/docker/docker-compose-hft.tar.gz|Download]] | |||
<br> | <br> | ||
|style="width:90%; vertical-align: top;"| | |style="width:90%; vertical-align: top;"| | ||
<br> | <br> | ||
|} | |} |
Latest revision as of 00:11, 25 November 2022
Update Nov2022 HFT/HCP - A Docker Image and a Dockerfile is now available , see the Download section
HTTP copy (HCP) is a small perl script which allows you to upload data through your Apache Server to disk.
The script has been tested on Debian 10 (Buster) but should work on other distros as well.
It was made to establish an alternative to scp without the need of dealing with PAM or Shell issues.
HCP is using the HTTP POST method and there shouldn't be a size limit unless you define one.
HCP comes with the client script (hcp.pl) and the Server (cgi) script.
Usage:
perl hcp.pl -f <filename> -url <url> -u <username> -p <password> -g (optional gzip data) Sample: perl hcp.pl -f c:\path\to\file\myfile.doc -url https://myserver.com -u myUser -p myPwd -g
Server script index.cgi, you need to specify the upload path within the script:
my $uploadpath='/path/to/upload/';
The server script is able to send syslog messages, if this is an option then the syslog module must be installed
using cpan, build-essential is needed to do this:
apt-get install build-essential cpan install Net::Syslog
Then specify the ip to your syslog server in index.cgi:
my $SyslogHost='192.168.1.1';
Apache sample configuration, it allows http/https using basic auth
<Directory "/var/www/hcp.my-server.com/cgi-bin"> Options ExecCGI DirectoryIndex index.cgi Order allow,deny Allow from all #Make sure to enable the Apache cgi and perl module AddHandler cgi-script .cgi .pl AuthName "HCP Access" AuthType Basic AuthUserFile /var/www/hcp.my-server.com/.htpasswd.users Require valid-user </Directory> # ================================================= # SSL/TLS settings # ================================================= <VirtualHost *:443> ServerName hcp.my-server.com DocumentRoot /var/www/hcp.my-server.com/cgi-bin ErrorLog /var/log/apache2/hcp.my-server.com.error.log CustomLog /var/log/apache2/hcp.my-server.com.log common SSLStrictSNIVHostCheck off SSLCertificateFile /path/.../fullchain.pem SSLCertificateKeyFile /path/.../privkey.pem SSLHonorCipherOrder On SSLProtocol +ALL -SSLv3 -SSLv2 SSLCipherSuite DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA </VirtualHost> <VirtualHost *:80> ServerName hcp.my-server.com DocumentRoot /var/www/hcp.my-server.com/cgi-bin ErrorLog /var/log/apache2/hcp.my-server.com.error.log CustomLog /var/log/apache2/hcp.my-server.com.access.log common </VirtualHost>
|
|
|