A.4 Migrating Your Web Server from NetWare to Linux

This section provides information on how to migrate a previous installation of Apache on NetWare to a Linux Web server.

A.4.1 Administrative Differences

With Apache on NetWare, most of your administrative tasks are performed in Apache Manager, as described in Section 2.3, Using Apache Manager in Your Web Browser. This simplified Web interface makes it easy to administer your Web site configuration. However, with Linux, most of your administration tasks are performed from the command line using a text editor.

A.4.2 Migrating Virtual Hosts

On NetWare, virtual hosts are added by either editing the httpd.conf file by hand or using Apache Manager to create a new virtual host, as described in Section 4.7, Creating Virtual Hosts. On Linux, you need to edit the /etc/apache2/vhost.d/vhost.conf file. There is a vhost.template file in the same directory that you can use as an example to create a vhost.conf file.

Copy the virtual host information from the NetWare /apache2/conf/httpd.conf file to the new /etc/apache2/vhost.d/vhost.conf file. Then, in the new vhost.conf file, change the IP address, the directory paths for the document root, log file locations, and script alias (cgi-bin location) locations. Make any other additional settings for the virtual host in the virtual host block.

Perform these tasks for each virtual server that is migrating to Linux.

A.4.3 Copying Web Pages

One of the first tasks that needs to be performed to migrate your Web site from NetWare to Linux is to move your Web pages to the new Linux Web server. The Web pages are generally stored in the document root. (By default, the document root for on NetWare is /apache2/htdocs. By default, the document root on Linux is /srv/www/htdocs/.)

Map a drive to both NetWare and Linux on a Windows workstation. Browse to the /apache2/htdocs directory on NetWare, then copy all the files and folders in that directory to the /srv/www/htdocs directory on the Linux Web server.

Copying Virtual Host Pages

After you have finished copying the files for the document root, you need to perform the same task for each virtual host on the Web server. The default location for virtual hosts on Linux is /srv/www/vhosts/.

Copying Scripting Files

If you are running any script languages such as PHP or Perl, you need to copy your Perl and PHP files to the proper directories. If you are using the cgi-bin as the script alias for these files, copy the files to the /srv/www/cgi-bin directory. The default location for the cgi-bin on NetWare /apache2/cgi-bin directory. You can use the mapped drives to copy the script files to the Linux cgi-bin directory. Remember to verify you are in the correct directory on both servers before copying the script files.

A.4.4 Copying Log Files

If you want to keep your log files from your NetWare Web server, you need to move them to your Linux Web server. On NetWare, the default location for log files is /sys/apache2/logs. On Linux, the default location for log files is /var/log/apache2.

You can use the mapped drives to copy the log files from the NetWare server to the Linux server. Remember to verify you are in the correct directory on both servers before copying the log files.

A.4.5 Adding Modules

Modules are handled similarly for on NetWare and Linux. If you need to add additional modules to your Linux Web server, use YaST to install the module on the server. After installing the module, add the module's configuration file to the /etc/apache2/conf.d/ directory. The apache2 executable automatically loads any configuration files located in this directory.