4D v14.3Web server configuration and connection management |
||
|
4D v14.3
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). Each time a Web browser attempts to connect to the database, the request is handled as follows:
|
PROPERTIES
Product: 4D SEE ALSO
_o_SET WEB DISPLAY LIMITS ARTICLE USAGE
4D Language Reference ( 4D v14 R2) Inherited from : Web server configuration and connection management ( 4D v12.4) |