Make Use of an Alias
From OpenFSG
Contents |
The Alias Function
The alias function allows you to redirect URL browser requests to a different path on your harddisk. This can also enhance security on your server.
Requirements
- A basic understanding of How to Host a Web Site
- A DynDNS account (for this example we will use mydns.dyndns.org)
- A comprehensive folder structure
- A valid path to a folder other than the websites current (root) folder
Setting up the Folders
Any Folder you create through the Admin Control Panel (ACP) is considered the root of your website (and can not be used for a path to an Alias for this website).
Setting up the Folder Structure in advance can save you a lot of trouble. Ideally you want to set it up comprehensively (with a logical structure). In this example we create the following Folders:
public_html (fill this folder with websites which can be publicly accessed)
private_html (fill this with websites with restricted access)
jumpto (this folder will remain empty!)
Setting up a Web Site
OK, so now you should have uploaded your Website, let's say the bulletin board phpbb, in private_html because you want to restrict access to it. This means you now have the following folder structure:
ROOT- (in explorer this is the \\FSG\FSG folder)
--public_html
--private_html
---phpbb (with all the files etc.)
--jumpto
Now go to the ACP-->Services-->HTTP server-->New Fill in the following fields:
Name: Bulletin_Board (can be anything)
DNS: forum.mydns.dyndns.org (! you can add any name before your dns account [anything].mydns.dyndns.org)
Port: 80
Folder: jumpto (hint: from now on make all your websites point to this folder, then redirect them with an alias)
Then press 'Apply'
After this you will see the message "The HTTP server must be restarted. This will take several seconds. Please click here." Do so and return to the ACP-->Services-->HTTP server. Select the radiobutton of the website you just created and click Properties-->Folder Alias-->New
Adding the Alias
Name: Forum (can be anything)
Alias: forum (can be anything but is case-sensitive so 'Forum' is different as compared to 'forum')
Path: private_html\phpbb\ (note the ending '\' and not in front, this will ask for username / pass) (*)
Then press 'Apply'
After this you will see the message "The HTTP server must be restarted. This will take several seconds. Please click here." Do so and you are good to go!
So now the proper URL for your phpbb website is: http://forum.mydns.dyndns.org/forum
(*) You must assign a user to the folder private_html to have rights by way of the ACP-->Folders
Related
See How To Enable PHP to run PHP driven websites See How To Host a Web Site See How To Password Protect A Web Page
