4D v14.3Web Server Settings |
||
|
4D v14.3
Web Server Settings
Web Server Settings
You can configure the operation of the 4D Web server using the parameters set on the Web page of the Database Settings. This section describes the parameters of the Configuration, Options (I) and (II) tabs of this page.
Compatibility note: Certain Web mechanisms found in previous versions of 4D are now considered obsolete (for example, "Do not remove “/” on unknown URLs"). For compatibility's sake, these mechanisms can still be used in converted databases. In this case, you can display them and if necessary disable them on the Compatibility page of the Database Settings. Indicates whether the Web server will be launched on startup of the 4D application. This option is described in the Web server configuration and connection management section. By default, 4D publishes a Web database on the regular Web TCP Port, which is port 80. If that port is already used by another Web service, you need to change the TCP Port used by 4D for this database. Modifying the TCP port allows you to start the 4D Web server under Mac OS X without being the root user of the machine (see Web server configuration and connection management section). Note: If you specify 0, 4D will use the default TCP port number 80. From a Web browser, you need to include that non-default TCP port number into the address you enter for connecting to the Web database. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the TCP port number 8080, you will specify “123.4.567.89:8080”. WARNING: If you use TCP port numbers other than the default numbers (80 for standard mode and 443 for SLL mode), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your Web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol (unless you know what you are doing). To find out the standard assignment of TCP port numbers, refer to the Appendix B, TCP Port Numbers section in the documentation of the 4D Internet Commands. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals, for example in the 2000's or 3000's. You can define the IP address on which the Web server must receive HTTP requests. Note: Starting with 4D v14, the HTTP server automatically supports IPv6 address notation when the All option is selected in the "IP Address" list. For more information, refer to Support of IPv6. By default, the server responds to all IP addresses (All option). The drop-down list automatically lists all available IP addresses on the machine. When you select a specific address, the server only responds to requests sent to this address. This feature is for 4D Web Servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most Internet host providers. Implementing such a MultiHoming system requires specific configurations on the Web server machine:
To configure a MultiHoming system on Mac OS:
Please check the Apple documentation for more information.
To configure a MultiHoming system on Windows:
Indicates whether or not the Web server will accept secure connections. This option is described in the Using SSL Protocol section. Allows you to modify the TCP/IP port number used by the Web server for secured HTTP connections over SSL (HTTPS protocol). By default, the HTTPS port number is set to 443 (standard value).
This option controls support of HTTP synchronization requests containing /4DSYNC URLs. It is covered in the Connection Security section. Allows you to define the default location of the Web site files and to indicate the hierarchical level on the disk above which the files will not be accessible. This option is described in the Connection Security section. You can designate a default home page for all the browsers that connect to the database. This page can be static or semi-dynamic. By default, when the Web server is launched for the first time, 4D creates a home page named “index.html” and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the Web server will obtain the following page: To modify the default home page, simply replace it in the database root folder with your own “index.html” page or enter the relative access path of the page that you want to define in the “Default Home Page” entry area.
For example, if you want the default home page to be “MyHome.htm”, and it is located in the “Web” folder (itself located in the default HTML root folder of the database), enter “Web/MyHome.htm”. Note: You can also define a default home page for each Web process by using the routine WEB SET HOME PAGE. If you do not specify a default custom home page, the On Web Connection Database Method is called. It is up to you to process the request procedurally. The 4D Web Server has a cache that allows you to load static pages, GIF images, JPEG images (<128 kb) and style sheets (.css files) in memory, as they are requested. The cache is shared between all the Web processes. You can set the size of the cache in the Preferences. By default, the cache of the static pages is not enabled. To activate it, simply check the Use the 4D Web cache option. You can modify the size of the cache in the Pages Cache Size area. The value you set depends on the number and size of your Web site’s static pages, as well as the resources that the host machines has at its disposal. Note: While using your Web database, you can check the performance of the cache by using the routine WEB GET STATISTICS. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. Once the cache has been enabled, the 4D Web server looks for the page requested by the browser first in the cache. If it finds the page, it sends it immediately. If not, 4D loads the page from disk and places it in the cache. At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). Allows you to set the maximum timeout before closing for inactive Web processes on the server. This option indicates the strictly high limit of Maximum Concurrent Web Processes of any type (standard Web processes or belonging to the“pool of processes”) that can be simultaneously open on the server. This parameter allows prevention of 4D Server saturation as the result of massive number of requests. By default, this value is 32000. You can set the number anywhere between 10 and 32000. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the following message “Server unavailable” (status HTTP 503 – Service Unavailable) for each new request. Note: You can also set the maximum number of Web using the WEB SET OPTION command. The “pool” of Web processes allows increasing the reactivity of the Web server. This reserve is sized by a minimum (0 by default) and a maximum (10 by default) of processes to recycle. These processes can be modified using the SET DATABASE PARAMETER command. Once the maximum number of Web processes has been changed, if this number is inferior to the superior limit in the “pool”, this limit is lowered to the maximum number of Web processes. In theory, the maximum number of Web processes is the result of the following formula: Available memory/Web process stack size. Enables or disables the internal mechanism for automatic handling of user sessions by the 4D HTTP server. This mechanism is described in the Web Sessions Management section. By default, this mechanism is enabled in databases created with 4D v13 and later versions. However, for compatibility reasons, it is disabled in databases converted from previous versions of 4D. You must enable it explicitly in order to benefit from this functionality. When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). Allows you to optimize the operation of the 4D Web server in remote mode by reusing Web processes created for processing previous Web requests. In fact, the Web server of 4D needs a specific Web process for the handling of each Web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. When the Reuse Temporary Contexts option is checked, in remote mode 4D maintains the specific Web processes and reuses them for subsequent requests. By removing the process creation stage, Web server performance is improved. In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. Notes:
Configuration of Web site access protection using passwords. This option is described in the Connection Security section. By default, the 4D Web server converts the extended characters in the dynamic and static Web pages according to HTML standards before sending them. They are then interpreted by the browsers. To do this, check the Send Extended Characters Directly option. The Standard Set drop-down list allows you to define the set of characters to be used by the 4D Web server. By default, the character set is UTF-8. The Web server of 4D can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the Web browser and the server to save system resources and to optimize transfers. Two options allow you to set how the keep-alive connections work:
|
PROPERTIES
Product: 4D SEE ALSO
Connection Security ARTICLE USAGE
4D Language Reference ( 4D v14 R2) Inherited from : Web Server Settings ( 4D v13.5) |