WebSpace: Difference between revisions

From UMIACS
Jump to navigation Jump to search
No edit summary
No edit summary
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
UMIACS provides web space hosting for research/lab pages and user pages.
UMIACS provides static web space hosting for research/lab pages and user pages.


== '''Hosting websites in UMIACS Object Store ''(preferred method)''''' ==
== '''Hosting websites in UMIACS Object Store ''(preferred method)''''' ==
Please refer to section on the [https://obj.umiacs.umd.edu/obj/help UMIACS Object Store Help Page] or [[OBJ]] on "Hosting a Website in your Bucket." This is currently our most updated and reliable method for hosting websites.
Please refer to the section "Hosting a Website in your Bucket" on the [https://obj.umiacs.umd.edu/obj/help UMIACS Object Store Help Page] or visit [[OBJ/WebHosting]]. This is currently our most updated and reliable method for hosting websites.


==Main Website and Lab Pages==
==Main Website and Lab Pages==
<pre>http://www.umiacs.umd.edu</pre>
<pre>http://www.umiacs.umd.edu</pre>


Users can access the main website and lab sites for editing in two ways:
You can access the main website and lab sites for editing in two ways:
* From <b>Unix</b> as /fs/www - and can be remotely accessed by [[SFTP]] to a supported Unix host (eg. [[OpenLAB]])
* From <b>Unix</b> as /fs/www - and can be remotely accessed by [[SFTP]] to a supported Unix host (eg. [[Nexus]]).
* From <b>Windows</b> as \\fluidfs.ad.umiacs.umd.edu\www-umiacs - and remotely accessed by the same file share over the [[VPN]]
* From <b>Windows</b> as \\umiacs-webftp\www-umiacs - and remotely accessed by the same file share over the [[VPN]].


Faculty members and authorized users can modify their own public profiles on the main UMIACS homepage. For instructions, see [[ContentManagement]].
Faculty members and authorized users can modify their own public profiles on the main UMIACS homepage. For instructions, see [[ContentManagement]].


==Personal Web Space==
==Personal Web Space==
Your personal website URL at UMIACS is
Your personal website URL at UMIACS is


<pre>http://www.umiacs.umd.edu/~username</pre>
<pre>http://www.umiacs.umd.edu/~username</pre>


where '''username''' is your UMIACS username. Users can set this page to redirect to any page of their choice by setting the '''Home Page''' attribute in their UMIACS [https://intranet.umiacs.umd.edu/directory/info/ directory entry].
where '''username''' is your UMIACS username. You can set this page to redirect to any page of your choice by setting the '''Home Page''' attribute in your UMIACS [https://intranet.umiacs.umd.edu/directory/info/ directory entry].


In general, large datasets related to a lab's research should go into the specific lab's web tree, not the individual users.  Remember that a user's webpage is not permanently maintained once the user leaves UMIACS.
In general, large files or directories for distribution related to a lab's research should go into the specific lab's web tree, not your individual web tree.  Remember that your webpage is not permanently continued upon your departure from UMIACS.


UMIACS currently supports two ways of hosting a personal website within our network, the Object Store and the OPENLab file space.
UMIACS currently supports hosting a personal website on the Object Store.


===UMIACS Object Store===
===UMIACS Object Store===
This is the preferred method of hosting a personal website at UMIACS. Please see the [https://obj.umiacs.umd.edu/obj/help UMIACS Object Store (OBJ) Help Page] for more information on creating a website within OBJ. Once you create your website in OBJ, you will need to set your directory '''Home Page''' to the bucket's URL (the URL that ends in <code>umiacs.io</code>).
This is the preferred method of hosting a personal website at UMIACS. Please see the [https://obj.umiacs.umd.edu/obj/help UMIACS Object Store (OBJ) Help Page] for more information on creating a website within OBJ. Once you create your website in OBJ, you will need to set your directory '''Home Page''' to the bucket's URL (the URL that ends in <code>umiacs.io</code>).


===OPENLab File Space=== (Currently Being Phased Out)
===Nexus File Space===
{{Note|'''''This service has been deprecated.'''''}}


This is primarily a legacy method for users who already have their websites configured this way. If you believe that your circumstances require your personal website to be hosted on this file space, please contact the [[HelpDesk | Help Desk]]. (This does not affect existing users who already have websites hosted on the OPENLab file space.)
This is primarily a legacy method for users who already have their websites configured this way. If you believe that your circumstances require your personal website to be hosted on this file space, please contact the [[HelpDesk | Help Desk]]. (This does not affect existing users who already have websites hosted on the Nexus file space.)


You will need set your directory '''Home Page''' attribute to <code>http://users.umiacs.umd.edu/~username</code>, where '''username''' is your UMIACS username (similar to your personal URL above). You can access your website for editing in two ways:
You will need set your directory '''Home Page''' attribute to <code>http://users.umiacs.umd.edu/~username</code>, where '''username''' is your UMIACS username (similar to your personal URL above). You can access your website for editing in two ways:


* From <b>Unix</b> as /fs/www-users/username - and can be remotely accessed via [[SFTP]] to a supported UNIX host (eg. [[OpenLAB]]).
* From <b>Unix</b> as /fs/www-users/username - and can be remotely accessed via [[SFTP]] to a supported UNIX host.
* From <b>Windows</b> as \\fluidfs.ad.umiacs.umd.edu\www-users\username - and remotely accessed by the same file share over the [[VPN]].
* From <b>Windows</b> as \\umiacs-webftp\www-users\username - and remotely accessed by the same file share over the [[VPN]].


==Adding A Password Protected Folder To Your Web Space==
==Adding A Password Protected Folder To Your Web Space==
{{Note|'''''This method will NOT work in the UMIACS Object Store.'''''}}


1) Create the directory you want to password protect or <tt>cd</tt> into the directory you want to password protect
1) Create the directory you want to password protect or <tt>cd</tt> into the directory you want to password protect.


2) Create a file called ''.htaccess'' (<tt> vi .htaccess</tt>) in the directory you wish to password protect.
2) Create a file called ''.htaccess'' (<tt> vi .htaccess</tt>) in the directory you wish to password protect.


3) In the file you just created type the following lines  
3) In the file you just created, type the following lines  


<pre>
<pre>
Line 54: Line 53:
</pre>
</pre>


For example, if you were going to protect the <tt>/fs/www-users/username/private</tt> directory and you want the required name to be <tt>class239</tt>, then your file would look like this:
For example, if you were going to protect the <tt>/fs/www-users/username/private</tt> directory and you want the required name to be <tt>class239</tt>, then your file would look like this:
<pre>
<pre>
AuthUserFile /fs/www-users/username/private/.htpasswd
AuthUserFile /fs/www-users/username/private/.htpasswd
Line 71: Line 70:


==Restricting Content based on IP address==
==Restricting Content based on IP address==
It is possible to have pages on your webspace only accessible to clients connecting from certain IP addresses. In order to accomplish this, cd in to the directory you wish to restrict, and edit your ''.htaccess'' or ''httpd.conf'' file. The example below shows how to make content only viewable to clients connecting from the UMD wifi in Apache 2.2.
It is possible to have pages on your webspace only accessible to clients connecting from certain IP addresses. In order to accomplish this, cd in to the directory you wish to restrict, and edit your ''.htaccess'' or ''httpd.conf'' file. The example below shows how to make content only viewable to clients connecting from the UMD WiFi in Apache 2.2.


<pre style="white-space: pre-wrap;  
<pre style="white-space: pre-wrap;  

Latest revision as of 20:32, 18 October 2022

UMIACS provides static web space hosting for research/lab pages and user pages.

Hosting websites in UMIACS Object Store (preferred method)

Please refer to the section "Hosting a Website in your Bucket" on the UMIACS Object Store Help Page or visit OBJ/WebHosting. This is currently our most updated and reliable method for hosting websites.

Main Website and Lab Pages

http://www.umiacs.umd.edu

You can access the main website and lab sites for editing in two ways:

  • From Unix as /fs/www - and can be remotely accessed by SFTP to a supported Unix host (eg. Nexus).
  • From Windows as \\umiacs-webftp\www-umiacs - and remotely accessed by the same file share over the VPN.

Faculty members and authorized users can modify their own public profiles on the main UMIACS homepage. For instructions, see ContentManagement.

Personal Web Space

Your personal website URL at UMIACS is

http://www.umiacs.umd.edu/~username

where username is your UMIACS username. You can set this page to redirect to any page of your choice by setting the Home Page attribute in your UMIACS directory entry.

In general, large files or directories for distribution related to a lab's research should go into the specific lab's web tree, not your individual web tree. Remember that your webpage is not permanently continued upon your departure from UMIACS.

UMIACS currently supports hosting a personal website on the Object Store.

UMIACS Object Store

This is the preferred method of hosting a personal website at UMIACS. Please see the UMIACS Object Store (OBJ) Help Page for more information on creating a website within OBJ. Once you create your website in OBJ, you will need to set your directory Home Page to the bucket's URL (the URL that ends in umiacs.io).

Nexus File Space

Exclamation-point.png This service has been deprecated.

This is primarily a legacy method for users who already have their websites configured this way. If you believe that your circumstances require your personal website to be hosted on this file space, please contact the Help Desk. (This does not affect existing users who already have websites hosted on the Nexus file space.)

You will need set your directory Home Page attribute to http://users.umiacs.umd.edu/~username, where username is your UMIACS username (similar to your personal URL above). You can access your website for editing in two ways:

  • From Unix as /fs/www-users/username - and can be remotely accessed via SFTP to a supported UNIX host.
  • From Windows as \\umiacs-webftp\www-users\username - and remotely accessed by the same file share over the VPN.

Adding A Password Protected Folder To Your Web Space

Exclamation-point.png This method will NOT work in the UMIACS Object Store.

1) Create the directory you want to password protect or cd into the directory you want to password protect.

2) Create a file called .htaccess ( vi .htaccess) in the directory you wish to password protect.

3) In the file you just created, type the following lines

AuthUserFile "/your/directory/here/".htpasswd
AuthName "Secure Document"
AuthType Basic
require user username

For example, if you were going to protect the /fs/www-users/username/private directory and you want the required name to be class239, then your file would look like this:

AuthUserFile /fs/www-users/username/private/.htpasswd
AuthName "Secure Document"
AuthType Basic
require user class239

4) Create a file called .htpasswd in the same directory as .htaccess. You create this file by typing in htpasswd -c .htpasswd username in the directory area to be protected.

In the example above, the username is class239 so you would type htpasswd -c .htpasswd class239

You will be prompted to enter the password you want. The .htpasswd file will be created in the current directory and will contain an encrypted version of the password.

To later change the username, edit the .htaccess file and change the username. If you want to later change the password, just retype the above line in step 4 and enter the new password at the prompt.

Restricting Content based on IP address

It is possible to have pages on your webspace only accessible to clients connecting from certain IP addresses. In order to accomplish this, cd in to the directory you wish to restrict, and edit your .htaccess or httpd.conf file. The example below shows how to make content only viewable to clients connecting from the UMD WiFi in Apache 2.2.

SetEnvIF X-Forwarded-For "^128\.8\.\d+\.\d+$" UMD_NETWORK
SetEnvIF X-Forwarded-For "^129\.2\.\d+\.\d+$" UMD_NETWORK
SetEnvIF X-Forwarded-For "^192\.168\.\d+\.\d+$" UMD_NETWORK
SetEnvIF X-Forwarded-For "^206\.196\.(?:1[6-9][0-9]|2[0-5][0-9])\.\d+$" UMD_NETWORK
SetEnvIF X-Forwarded-For "^10\.\d+\.\d+\.\d+$" UMD_NETWORK
Order Deny,Allow
Deny from all
Allow from env=UMD_NETWORK

The SetEnvIF directive will modify one's environment if the specified attribute matches the provided regular expression. In this example, IP addresses that are forwarded from an IP within UMD's IP space are tagged with UMD_NETWORK. Then, all traffic to the example directory is blocked unless it has the UMD_NETWORK tag. See the following pages for a more in depth explanation of the commands used.

.htaccess, SetEnvIf, Order, Deny, Allow