Web Hosting at UNBC

What is web.unbc.ca?

web.unbc.ca is a basic web server, which serves content from the public_html directory within UNBC user home folders (aka H: drives). Individual sites can be accessed at https://web.unbc.ca/~<username> (For example, if your username is 'john' the URL would be https://web.unbc.ca/~john).

It can be used to make small files available for download over the web, or to host basic HTML/PHP web pages. The amount of content that can be hosted is limited by the individual's H: drive quota.

Note: UNBC Home folders (aka H: drives) are being decommissioned as of September 2025, in favour of Microsoft OneDrive. This means that web.unbc.ca pages will no longer be editable as of September 2025, and will be deleted by September 2026. If you have a page that needs to be editable/accessible after September 2025, please contact ITS to discuss alternative options.

How to set up my personal web.unbc.ca page?

If you do not already have a personal web.unbc.ca page set up, now is not the time to be doing so. As per the message above, home folders are being retired in September 2025. Please contact ITS to discuss alternative web hosting options.

If you already have a web.unbc.ca page available (https://web.unbc.ca/~<username>) you can continue to access and update it until September 2025.

Examples - File Sharing & Hosting a Website

Below are two common use cases for web.unbc.ca, and some very basic examples.

Making Files Available for Download

web.unbc.ca is no longer a recommended method for making files available for download. Instead, please consider putting the files in your personal OneDrive. See File Sharing with OneDrive for additional instructions.

Hosting a Basic Webpage

In this scenario we will create a basic HTML web page and then show a basic php script which can give details on the version of php. This assumes that you already have a correctly configured public_html sub-folder with your home folder:

  • Open your home folder: \\home.unbc.ca\<username>\
    • This should be accessible from any machine that is connected to the UNBC campus network (on campus, on UNBC VPN, or a VMware Horizon virtual desktop)
  • Inside your home folder should be a public_html sub-folder.
  • Inside public_html, create a file index.html with some basic content:
    <!DOCTYPE html>
    <html>
        <head>
            <title>Hello World</title>
        </head>
        <body>
            <p>This is an example of a simple HTML page with one paragraph.</p>
        </body>
    </html>
  • Browse to your web.unbc.ca url to check the results

  • Still in the public_html folder, create a new file phpinfo.php with the following content:
    <?php
    phpinfo();
    ?>
  • Browse to web.unbc.ca/~<username>/phpinfo.php to see the result of the php script

​​​​​​​

These webpage examples are extremely basic. There are a multitude of guides available online with more in-depth examples for simple HTML/PHP web pages. If you require more complex web page features, please contact ITS support and we can discuss options.

Print Article

Details

Article ID: 1179
Created
Tue 4/27/21 1:16 PM
Modified
Thu 9/19/24 8:44 AM