Installing a new virtual web with FP2000 extensions
This article tells you how to install a new virtual web and allow a user to update that web. It assumes the web site will contain the FrontPage 2000 Extensions.You may also wish to see the instructions for FrontPage 98.
See also other FrontPage articles especially FrontPage 2000 – installing the extensions.
For this example, we are creating a new virtual web called test.freebsddiary.org.
Create the DNS entries
If you are running a webserver, you’re probably also running a DNS server. For my example, I’m creating a website which I can use for testing. So I’ll call it test.freebsddiary.org. I modified the zone file and added the following entry:test IN A 192.168.0.69
You’ll notice that the above IP number is not accessible from the internet. It is a private non-routable address. It’s here on my LAN.
Then I hup’d named, and checked the error logs, just in case.
Create the virtual web
You should have a look at Apache – virtual hosts for more information on virtual hosts. I added the following to<VirtualHost 192.168.0.69> ServerAdmin webmaster@freebsddiary.org DocumentRoot /www/test ServerName test.unixathome.org ErrorLog /www/logs/test-error.log CustomLog /www/logs/test-access_log common </VirtualHost>
Note that the IP address listed above matches the IP address assigned to test.unixathome.org.
Remember to create the directory /www/test.
Then I restarted apache via:
/usr/local/sbin/apachectl restart
Add a new user
Here is how I added a new user (i.e. logon) to the FreeBSD system. We are adding susan to the system and give her a home directory of /home/susan. However, we are not going to allow this user to actually logon to FreeBSD. They will only access the website through FrontPage 98. This is the reason why we don’t give her a shell.# adduser Use option ``-silent'' if you don't want to see all warnings and questions. Check /etc/shells Check /etc/master.passwd Check /etc/group Enter your default shell: bash csh date no nologin sh : bash Your default shell is: bash -> /usr/local/bin/bash Enter your default HOME partition: [/home]: Copy dotfiles from: /usr/share/skel no [/usr/share/skel]: Send message from file: /etc/adduser.message no [/etc/adduser.message]: Use passwords (y/n) [y]: Ok, let's go. Don't worry about mistakes. I will give you the chance later to correct any input. Enter username [a-z0-9_-]: susan Enter full name []: Susan Crinion Enter shell bash csh date no nologin sh : Enter home directory (full path) [/home/susan]: Uid [1009]: Enter login class: default []: Login group susan [susan]: Login group is ``susan''. Invite susan into other groups: guest no [no]: Enter password []: Enter password again []: Name: susan Password: **** Fullname: Susan Crinion Uid: 1009 Gid: 1009 (susan) Class: Groups: susan HOME: /home/susan Shell: /usr/local/bin/bash OK? (y/n) [y]: Added user ``susan'' Send message to ``susan'' and: no root second_mail_address [no]: Susan Crinion, your account ``susan'' was created. Have fun! See also chpass(1), finger(1), passwd(1) Add anything to default message (y/n) [n]: Send message (y/n) [y]: n Copy files from /usr/share/skel to /home/susan Add another user? (y/n) [y]: n Goodbye!
The next step is to create the directories for the web. In this case, Susan will have a home directory of /home/susan. In her home directory, she will have a link to the actual website at /www/test.freebsddiary.org. This link is named public_html.
# mkdir /www/test.freebsddiary.org # ln -s /www/test.freebsddiary.org/ /home/susan/public_html
A common directory for all websites
It is a good idea to put all of the physical files for a webserver under a common directory. I have chosen /www. This makes it easy to set the permissions for that file tree. And it makes backups easier too.Here’s what I put in my /usr/local/etc/apache/httpd.conf file to set the permissions on this tree:
<directory "/www"> <Directory "/www"> Options Indexes FollowSymLinks ExecCGI <IfDefine FRONTPAGE> AllowOverride AuthConfig Limit Indexes Options </IfDefine> <IfDefine !FRONTPAGE> AllowOverride None </IfDefine> Order allow,deny Allow from all </Directory>
Install FrontPage Extensions for this virtual website – interactive
In this example, we are adding FP2000 to the virtual website[root@fred:/usr/local/frontpage/version4.0/bin] # ./fpsrvadm.exe Type "fpsrvadm -h" for help on command line options Please enter command: 0) quit 1) install 2) upgrade 3) uninstall 4) check and fix 5) enable authoring 6) disable authoring 7) change security settings 8) recalculate links 9) delete 10) rename 11) set directory executable 12) set directory no executable 13) putfile 14) recalcfile 15) create a subweb 16) merge a subweb into its parent web 17) full uninstall of all FrontPage information 18) chown Your choice [1]: Please enter server type: 0) apache 1) apache-fp 2) ncsa 3) netscape-enterprise 4) netscape-fasttrack 5) stronghold Your choice [0]: 1 Enter server config filename: /usr/local/etc/apache/httpd.conf Enter host name for multi-hosting []: test.freebsddiary.org Starting install, port: test.freebsddiary.org:80, web: "root web" Enter UNIX username []: susan Enter UNIX group []: susan User name to add to FrontPage group "administrators" [administrator]: testwebsite Password for user "testwebsite": Confirm password: Creating web http://test.freebsddiary.org Chowning Content in service root web Install completed.
If you don’t supply the correct host name, you’ll get this error
When installing the FP Extensions, be sure to supply the same value for the host name as is specified in the config file. For example, if I misspell the host name:
Enter server config filename: /usr/local/etc/apache/httpd.conf Enter host name for multi-hosting []: test.freebsddiary.ort 'test.freebsddiary.ort' server is not a valid virtual server.
I have encountered interesting problems when using include files with httpd.conf
.
I was putting my virtual host definitions in a separate file and including them
like this:
include /usr/local/etc/apache/vhosts/vhosts.conf
My temporary solution was to not use an include file. Effective, but inelegant.
Doing it the wrong way
My thanks to Chuck Handshy for pointing out that I was using -p for both the port and the password in previous versions of this article. The following is wrong.Do not use this example. It is wrong.
# cd /usr/local/frontpage/version4.0/bin # ./fpsrvadm.exe -o install -t apache-fp \ -s /usr/local/etc/apache/httpd.conf \ -p 80 -m test.freebsddiary.org \ -u testwebsite -p password \ -xu susan -wg susan Starting install, port: password, web: "root web" Password for user "testwebsite": Confirm password: Creating web http://test.freebsddiary.org Chowning Content in service root web
As you can see, it’s installing to port "password". Ooops. I specified -p for the port and for the password. Thanks Chuck.
Install FrontPage Extensions for this virtual website – command line
You can also install FP Extensions from the command line. Here’s how I did it. I explain the parameters in the next section.# cd /usr/local/frontpage/version4.0/bin # ./fpsrvadm.exe -o install -t apache-fp \ -s /usr/local/etc/apache/httpd.conf \ -port 80 -m testing.mysecretdomain.org \ -u testuser1 -xu dan -wg dan Starting install, port: 80, web: "root web" Password for user "testuser1": Confirm password: Creating web http://testing.mysecretdomain.org Chowning Content in service root web Install completed.
Note that by omitting the password on the command line, you are prompted to enter the password. I think this is a good security feature of fpsrvadm.exe. In general, you should not type passwords on the command line as anyone can view the command by using the ps command.
I found I had to shutdown apache. A simple restart was not enough to get publishing to work.
Different users
It is important to note that there are two different types of users specfied in the process of adding FP extentions. In the above example, we have a user Susan, who has a login of susan. She can connect to the webserver via telnet using this login. [Actually, she can’t telnet. She has to use ssh, but that’s another story.]The user names don’t have to be the same. They don’t have to be different. If you are paranoid, you might make them different. But it’ll be easier for your users, I think, if the names are the same. But I’d suggest they keep different the passwords different in either case.
Authors vs administrators
Note: in the above example, I added an administrator. For most people this should be fine. The administrator can do just about anything with the website. But you may want to consider adding people as author, not administrator. I’m not sure of the implications, but if there’s only one person on the website, I prefer making them administrator, and leaving it at that. With multiple people, perhaps one adminstrator and many authors is a better approach.Access
After preforming this install, you should have a look at the root directory of your virtual web. In my example, the following file should be of interest# more .htaccess # more .htaccess # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName test.freebsddiary.org AuthUserFile /www/test.freebsddiary.org/_vti_pvt/service.pwd AuthGroupFile /www/test.freebsddiary.org/_vti_pvt/service.grp
If you look at the files listed on the last two lines, you’ll see some interesting stuff:
# more /www/test.freebsddiary.org/_vti_pvt/service.grp # -FrontPage- administrators: testwebsite authors:
That’s the login id we specifed when adding the FrontPage extensions. We can see that it is an adminstrator of the website. This means they can do anything. We can also use the fpsrvadm commad to add additional adminstrators, authors, etc. See http://officeupdate.microsoft.com/frontpage/wpp/serk98/admin.htm for more information.
# more /www/test.freebsddiary.org/_vti_pvt/service.pwd # -FrontPage- testwebsite:1pWXvqbWr4rx9
This file contains the encrypted passwords for this user.
Other notes
Brian Cook wrote in to say that he installed the apache13-mod_ssl port, then installed mod_php4, and finally just untared the fp40.freebsd.tar.Z and followed the directions on the Microsoft FP Homepage. The other thing that he needed to do (after following the directions on above for fp_admin.exe) was to edit the /usr/local/frontpage/version4.0/frontpage.cnf and add FollowSymLinks:1.He found that solution after he encountered an error when trying to install a FP web. The error said something about FollowSymlinks not being in the right group. After checking the Apache configuration items and finding the symlinks directive in the all the right places, he dumped the full error message into Google. Approximately ten minutes of reading and looking, he found the fix.
Im new on freeBSD.I just installed 4.5 & i dont know how to set up BIND for having DNS.could someone help me guide how to step by step? thanks
Start by asking in the Support Forum (click on FORUMS, top right).