Differences between revisions 1 and 22 (spanning 21 versions)
Revision 1 as of 2009-06-06 10:05:33
Size: 795
Editor: 41-62
Comment:
Revision 22 as of 2017-06-30 11:43:54
Size: 1888
Editor: bonaccos
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Homepage/Upload
Line 2: Line 3:
 * download this script as [[attachment:public_uploadscript_via_perl|index.cgi]]  * download this script as [[attachment:index.cgi.pl|index.cgi]]
Line 7: Line 8:
 * you can restrict the access to the script with a `.htaccess` file in `~/public_html/get/`. Find more about this [[http://httpd.apache.org/docs/2.0/howto/htaccess.html|here]].  * you can restrict the access to the script with a `.htaccess` file in `~/public_html/get/`. Find more about this [[http://httpd.apache.org/docs/2.2/howto/htaccess.html|here]] or read on below.
Line 10: Line 11:

== Protect The Upload Script With A Password ==

 * Create a file .htaccess and put it into `~/public_html/get/`
 * File content should be the following:<<BR>><<BR>>
  Auth''''''User''''''File /home/<your_username>/.htpasswd<<BR>>
  Auth''''''Type Basic<<BR>>
  Auth''''''Name "Password Required"<<BR>>
  Require valid-user<<BR>>
  <<BR>>
 Replace <your_username> with your actual Tardis-login name.<<BR>>
 * Run `chmod 755 ~/public_html/get/.htaccess`
 * Create a file .htpasswd in your homedirectory. If you choose a different (sub-)folder, please change the path in the .htaccess file.
 * Run `chmod 755 ~/.htpasswd`. If the .htpasswd file is in a different folder, change the chmod command accordingly.
 * File content should be the following:<<BR>><<BR>>
 <username>:<encrypted_password><<BR>>
 
 * On this website, you can create encrpyted passwords: http://www.htaccesstools.com/htpasswd-generator/. <<BR>>
 Copy and paste the result into the .htpasswd file.

 * These are all the required steps.
----
[[CategoryWEBS]]

Providing a public http upload script on your website with perl

  • download this script as index.cgi

  • copy it to ~/public_html/get/index.cgi

  • run chmod a+rx ~/public_html/get/

  • run chmod a+rx ~/public_html/get/index.cgi

  • create a directory mkdir ~/public_upload/ writable only for you chmod go-rwx ~/public_upload. The script will run with the rights of your account (through apache's suexec mechanism).

  • you can restrict the access to the script with a .htaccess file in ~/public_html/get/. Find more about this here or read on below.

  • the files will now be uploaded to ~/public_upload/

  • now you can access the script via http://people.ee.ethz.ch/~[USERNAME]/get

Protect The Upload Script With A Password

  • Create a file .htaccess and put it into ~/public_html/get/

  • File content should be the following:

    • AuthUserFile /home/<your_username>/.htpasswd
      AuthType Basic
      AuthName "Password Required"
      Require valid-user

    Replace <your_username> with your actual Tardis-login name.

  • Run chmod 755 ~/public_html/get/.htaccess

  • Create a file .htpasswd in your homedirectory. If you choose a different (sub-)folder, please change the path in the .htaccess file.
  • Run chmod 755 ~/.htpasswd. If the .htpasswd file is in a different folder, change the chmod command accordingly.

  • File content should be the following:

    <username>:<encrypted_password>

  • On this website, you can create encrpyted passwords: http://www.htaccesstools.com/htpasswd-generator/.
    Copy and paste the result into the .htpasswd file.

  • These are all the required steps.


CategoryWEBS

Web/Homepage/Upload (last edited 2020-09-02 09:52:33 by pmeier)