Difference between revisions of "OBJ/WebHosting"

From UMIACS
Jump to navigation Jump to search
Line 13: Line 13:
 
# [[UMobj|Set up your environment variables]].
 
# [[UMobj|Set up your environment variables]].
 
# On the shell enter <code>mkobj <bucket_name></code> to create a bucket. Your bucket name must be unique. You can enter <code>lsobj -l</code> to see the existing buckets.
 
# On the shell enter <code>mkobj <bucket_name></code> to create a bucket. Your bucket name must be unique. You can enter <code>lsobj -l</code> to see the existing buckets.
# Copy all the required files to the bucket: <code>cpobj [source_directory]/* <bucket_name>:</code>. For example, <code>cpobj /fs/www-users/jayid-test/* jayid-test:</code>
+
# Copy all the required files to the bucket: <code>cpobj [source_directory]/file_name <bucket_name>:</code>. For example, <code>cpobj /fs/www-users/jayid-test/index.html jayid-test:</code>
 
# Create a web configuration for your bucket: <code> webobj -m create -c website --index=index.html --error=error.html <bucket_name></code>
 
# Create a web configuration for your bucket: <code> webobj -m create -c website --index=index.html --error=error.html <bucket_name></code>
  
'''Note:''' Once the bucket is configured and all the required files are uploaded, please log into your [https://intranet.umiacs.umd.edu/directory/auth/duo?next=/directory/info/ UMIACS Directory] and update the Home Page to <code>http://<Bucket_name>.umiacs.io</code>. Replace <Bucket_name> with the name of the bucket you created.
+
'''Note:''' Once the bucket is configured and all the required files are uploaded, please log into your [https://intranet.umiacs.umd.edu/directory/auth/duo?next=/directory/info/ UMIACS Directory] and update the Home Page attribute to <code>http://<Bucket_name>.umiacs.io</code>. Replace <Bucket_name> with the name of the bucket you created.
  
 
== Accessing the Website ==
 
== Accessing the Website ==

Revision as of 16:58, 26 July 2021

Hosting a Website

Hosting a website in OBJ is quite easy and can be done in a few simple steps. There are two different ways you can set up your OBJ bucket to host a static website.

First Method (Using the Web Interface):

  1. Log into OBJ and create a bucket. Make sure to choose a bucket name carefully since this will be part of the web URL.
  2. Upload your index.html file and optional error.html file (and any other required files for your website) on the bucket that you just created.
  3. Once the bucket is created, click on Bucket Settings
  4. On the settings page, click on the blue Make Public button.
    Bucket settings.jpg
  5. Under Website Hosting, enter the name of your index.html (and optionally error.html) file and hit Submit.


Second Method (Using the UMobj CLI):

  1. Set up your environment variables.
  2. On the shell enter mkobj <bucket_name> to create a bucket. Your bucket name must be unique. You can enter lsobj -l to see the existing buckets.
  3. Copy all the required files to the bucket: cpobj [source_directory]/file_name <bucket_name>:. For example, cpobj /fs/www-users/jayid-test/index.html jayid-test:
  4. Create a web configuration for your bucket: webobj -m create -c website --index=index.html --error=error.html <bucket_name>

Note: Once the bucket is configured and all the required files are uploaded, please log into your UMIACS Directory and update the Home Page attribute to http://<Bucket_name>.umiacs.io. Replace <Bucket_name> with the name of the bucket you created.

Accessing the Website

You can access your personal website by using the default URL which has the form http://<Bucket_name>.umiacs.io. Alternatively, you can also visit www.umiacs.umd.edu/~username to visit your website.

Disabling a Website