Print this article Edit this article
Managing and Maintaining a Personal or Group Apache Server
What is an Apache server?
An Apache server hosts a one or more websites or webpages.
You can learn more about Apache hosting and its features at the link below.
How do I request an Apache server/website for my group?
You can request an Apache server/website for your Lab/Group/Organization at the link below.
How do I host my website on the Apache server?
Once you have an Apache server setup by ECN, your entire website will be contained inside a folder hosted on the ECN web server.
All you need to do is place your website files (.html, .css, .js, etc) inside the hosting folder. Below is an example of this:
Examples of what ECN hosting looks like on the web server (Linux)
## Example 1: Website files placed inside the "public_html" folder ##
/web/groups/<group name>/ <--- Hosting folder
-- public_html/ <--- Public webpages folder
-- index.html <--- Web page files (.html)
-- schedule.html
-- about_us.html
-- private/
-- var/
## Example 2: Website files placed directly inside the hosting folder ##
/web/entities/<group name>/ <--- Hosting folder
-- index.html <--- Web page files (.html)
-- schedule.html
-- about_us.html
How do I access my hosting folder to add/edit/remove website files?
There are two ways to access your hosting folder that will contain your website files.
- Through any SSH client (e.g. SecureCRT, Shell, PuTTY)
- By mapping the folder as a network drive in Windows
Note: When you requested your hosting server, ECN provides you credentials. You will need your
hosting account username, password, and hosting folder, and host (server).
Note: In some cases your username/password is your Purdue Career Account username/password
Note: To access your hosting account or hosting folder from off-campus may require use of the Purdue VPN
Accessing my hosting folder through an SSH client (for users with Linux experience)
(1) Use your favorite SSH client to ssh into <username>@<host>.
(2) Enter your hosting account password
(3) Navigate to your hosting folder
(4) Add/Edit/Remove website files inside your hosting folder.
## Use SSH to login to the hosting account
$ ssh myusername@host.ecn.purdue.edu
myusername@host.ecn.purdue.edu's password:
Last login: Thu Apr 20 15:54:03 2023 from host.ecn.purdue.edu
Linux host.ecn.purdue.edu 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
- Oracle database server downtime
On Tuesday, May 9, between 8:00pm and 8:30pm, the ECN Oracle database servers
will be down for patching.
## Go to your hosting directory
-bash-4.2$ cd /web/groups/<my group name>/
-bash-4.2$ ls
private public_html var
-bash-4.2$ cd public_html
-bash-4.2$ ls -lra
total 140
-rw-rw-r-- 1 group user 0 Nov 1 2017 index.html <--- Web page file (.html)
drwxrws--- 6 group user 4096 May 27 2021 ..
drwxrws--- 13 group user 4096 Nov 9 15:48 .
## Add, edit, or remove files using linux commands
-bash-4.2$ nano index.html
-bash-4.2$ cp ~/my_website/schedule.html ./
-bash-4.2$ rm about_us.html
Accessing hosting folder by mapping as a network drive (Windows OS)
(1) Open Dialog to Map a Network Drive
Instructions on how to map a network drive
(2) Choose any Drive: letter
(3) Use the server web.ecn.purdue.edu and your group name in the Folder: field.
It will look like \\web.ecn.purdue.edu\<group-name>
e.g. \\host.ecn.purdue.edu\mygroupname
(4) You will connect with your username and password.
Setting a landing page for your website
When navigating to your website URL, you may notice that it shows a folder directory with your site files inside. This is the default landing page for any Apache server site.
To prevent the contents of your website folder structure from appearing, you must add a file named index.html inside your hosting folder. If Apache detects a file called index.html, it will display that page instead when someone navigates to your website URL.
After adding an index.html file to our hosting folder, the website now displays that page instead of the folder structure.
Last Modified:
Apr 26, 2024 10:35 am GMT-4
Created:
Apr 28, 2023 1:27 pm GMT-4
by
jrclaypo
JumpURL: https://eng.purdue.edu/jump/2fd5143
Categories
- Knowledge Base > Web > Apache