[IIT-B] Get your site out there! How to host your website on cse.iitb.ac.in
If you’re a photographer, designer, …[ ]…. you can blog, share you calendar, upload gallaries, share your contact information and resumes! Now that you know all the benefits …[]… right away. But how? I’ll tell you, and I’m gonna keep this short;
- VS Code
Okay! This is important… You need to have VS Code on your PC. Okay, I’ve heard JetBrains is also great… but so is VS Code! I tried to do this accessing-remote-server via terminal; but VS Code is just so convenient. We are going to use VS Code.
2. Remote Explorer Extension
This is the extension, which is going to help us. Get it by clicking on the link or by searching it up in the extensions tab in VS Code.
3. Add a ssh entry to [cseUserName]@mars.cse.iitb.ac.in
Now, add a entry to.. well [cseUserName]@mars.cse.iitb.ac.in. (see the pics for how). Choose a config file (any location is fine). And vscode will ask for a ‘password’. This will be the password you set for your CSE webmail account (at the end of your 2nd semester mp). VSCode will ask for the password multiple times (2~3 times, I never bothered why). Doing all this will get your VS Code file explorer to show the files on the mars server of our dept. A few pictures -



Reload the vs code window after this step

4. Create a public_html folder at your [cseUserName] dir
So, till now was the logistics part of hosting your dept. webpage.(I am kinda writing this blog for the logistics of accessing the remote department server).
Now starts the HTML/ ‘server’ part of hosting it.
How this works is, when someone tries the https://www.cse.iitb.ac.in/~[cseUserName] address, the server looks up your dir, and a ‘public_html’ dir inside that (this is a custom behaviour). Inside this, it looks up for a ‘index.html’ file. This is the go-to default for a (any??)server, unless you lookup something such as https://www.cse.iitb.ac.in/~[cseUserName]/abcdefg.html.
So, you just need to place a index.html inside a public_html/ inside your [cseUserName] folder. And this will get served to the frontend anytime someone looks up ur website.
Few more points:
- I believe its better to develope your personal website on github pages, rather than on here. But just leave a link to github page from here, rather than just leaving the dept. webpage empty. A few other ideas are -
a. Setup routing from webpage to github pages (a senior did this)
b. Keep a light weight contact info page on the dept. website, and provide a link to the akwardly similar looking page hosted using github pages (Well, I did this)
c. Just maintain a department webpage and later on, move it to github pages.