4D v13.4Web server configuration and connection management |
||
|
4D v13.4
Web server configuration and connection management
Web server configuration and connection management
4D and 4D Server include a Web server (also called the HTTP server) that enables you to publish the data of your databases on the Web, transparently and dynamically. This section describes the steps necessary for launching the Web server and for the connection of browsers, as well as the process of connection management. To be able to launch the HTTP server of 4D or 4D Server, you must have the elements described below:
By default, any 4D client machine can publish the database to which it is connected on the Web. However, you can control the possibility of Web publication for each remote 4D machine by using the 4D password system. In fact, 4D Web licenses are considered as plug-in licenses by 4D Server. Therefore, in the same way as for plug-ins, you must retrict the right to use Web Server licenses to a specific group of users. To do this, display the Groups page in the Toolbox using 4D (you must have suitable access authorization to modify these parameters). Select a group in the list on the left, then check the Access option next to the 4D Client Web Server line in the Plug-in distribution area: Above: only users belonging to the "Web" group are authorized to publish their 4D machine as a Web server. Under Mac OS X, using TCP/IP ports reserved for Web publishing (ports 0 to 1023) requires specific access privileges. In order for you to be able to use these ports, 4D provides a utility program named HelperTool. When this program is installed, it retrieves the appropriate access rights and automatically takes charge of opening the Web ports. This mechanism functions with 4D (all modes), 4D Server and 4D Volume Desktop executable applications. The HelperTool application is included in the 4D software. Installation takes place automatically during the first opening of a port <1024 on the machine. The user is informed that a tool is going to be installed and is prompted to enter a name and an administrator password for the machine. This operation only takes place once. The 4D WebServer can be started in three different ways:
4D: 4D Server:
In the “Publishing Information” section, select the Launch Web Server at Startup check box, then click OK. Once this is done, the database will be automatically published on the Web each time you open it with 4D or 4D Server.
Tip: You do not need to quit 4D and reopen your database to start or stop publishing a database on the Web. You can interrupt and restart the Web server as many times as you want, using the Run menu, the Start HTTP server button or by calling the WEB START SERVER and WEB STOP SERVER commands. The Test Web Server command can be used to make sure the built-in Web server is functioning correctly (4D only). This command is accessible in the Run menu when the Web server is launched:
This command lets you verify that the Web server, home page display, etc. work correctly. The page is called using the URL Localhost, which is the standard shortcut designating the IP address of the machine on which the Web browser is executed. The command takes into account the TCP publication port number specified in the database settings. After you have started publishing a 4D database on the Web, you can connect to it using a Web browser. To do so:
At this time, your browser should display the home page of your Web site. If you have published a database in keeping with standard configurations, you should obtain the default home page of the 4D Web server. This page lets you test the connection and the server operation. You may also encounter one of the following situations: 1. The connection fails and you get a message such as “...the server may not be accepting connections or may be busy...”.
2. You connect, but you get an HTTP 404 "File not found" error. This means that the site home page has not be served. In this case, check that the home page actually exists at the location defined in the database settings (see the Web Server Settings section) or using the WEB SET HOME PAGE command. 3. You connect, but you do NOT obtain the Web page you were expecting! This can occur when you have several Web servers running simultaneously on the same machine. Examples:
In this kind of situation, you need to change the TCP port number on which your 4D Web database is published. To do so, refer to the Web Server Settings section. Note: If your database is protected by a password system, you may have to enter a valid user name and password (for more information, refer to the Connection Security section). Various 4D processes support Web publication of databases and connection to browsers. This paragraph describes these processes as well as their characteristics. The Web Server process runs and executes when the database is being published as a Web site. This is a 4D kernel process; you cannot abort this process using the Abort button. Also, you cannot attempt interprocess communication using commands such as CALL PROCESS. Note that the Web Server process does not have any user interface components (windows, menus, and so on). You can start the Web Server process in the following ways:
You can stop running the Web Server process in the following ways:
The purpose of the Web Server process is only to handle Web connection attempts. Starting the Web Server process does not mean that you open an actual Web connection, it just means that you allow Web users to initiate Web connections. Stopping the Web Server process does not mean that you close currently running Web connection processes (if any), it just means that you no longer allow Web users to initiate new Web connections. If there are open Web connection processes when you stop the Web Server process, each of these processes continues executing normally. Consequently, a delay time can be necessary to complete the termination of the Web Server process. Each time a Web browser attempts to connect to the database, the request is handled by the Web Server process, which performs the following steps:
|
PROPERTIES
Product: 4D SEE ALSO
_o_SET WEB DISPLAY LIMITS |