Using the tabs on the Web page, you can configure various aspects of the integrated Web server of 4D (security, startup, connections, Web services, etc.). For more information about how the 4D Web server works, refer to the Web Server chapter of the 4D Language Reference manual. For more information about 4D Web services, refer to the Publication and use of Web Services chapter.
By default, 4D publishes a Web database on the standard TCP/IP (HTTP) port, which is port 80. If that port is already used by another Web service, you need to change the port used by 4D for this database. Modifying the HTTP 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).
To do so, go to the HTTP Port enterable area and indicate an appropriate value (a HTTP port not already used by another TCP/IP service running on the same machine).
Note: If you specify 0, 4D will use the default HTTP port 80.
From a Web browser, you need to include that non-default HTTP 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 HTTP port number 8080, you will specify “123.4.567.89:8080”.
WARNING: If you use port numbers other than the default numbers (80 for HTTP and 443 for HTTPS), 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 ports 20 and 21, which are the default ports for that protocol. To find out the standard assignment of TCP/IP port numbers, refer to the Appendix B, TCP Port Numbers section in the 4D Internet Commands manual. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on 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.
By default, the server responds to all IP addresses (Any option), including IPv4 and IPv6 addresses.
The drop-down list automatically lists all available IPv4 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.
Note: For clarity, IPv6 addresses are not listed in the IP address drop-down list. If you need to filter IPv6 addresses, it is recommended to configure appropriately the firewall settings of the system.
Implementing a MultiHoming system requires specific configurations on the Web server machine:
Installing secondary IP addresses on Mac OS
To configure a MultiHoming system on Mac OS:
Open the TCP/IP Control Panel.
Select the Manually option from the Configuration pop up menu.
Create a text file called "Secondary IP Addresses" and save it in the Preferences subfolder of your System folder. Each line of the "Secondary IP Addresses" file should contain a secondary IP address and an optional subnet mask and router address for the secondary IP address.
Please check the Apple documentation for more information.
Installing secondary IP addresses on Windows
To configure a MultiHoming system on Windows:
Select the following sequences of commands (or their equivalents according to your version of Windows): Start menu > Control Panel > Network and Internet Connections > Network connections > Local Area Connection (Properties) > Internet Protocol (TCP/IP) > Properties button > Advanced... button. The "Advanced TCP/IP Settings" dialog is displayed.
Click the Add.... button in the "IP Addresses" area, and add additional IP addresses.
You can define up to 5 different IP addresses. You may need to consult your systems administrator in order to do so.
Allows you to modify the TCP/IP port number used by the Web server for secured HTTP connections over TLS (HTTPS protocol). By default, the HTTPS port number is set to 443 (standard value). You may consider changing this port number for two main reasons:
for security reasons — hacker attacks against Web servers are generally concentrated on standard HTTP ports (80 and 443).
for Mac OS X, in order to allow “standard” users to launch the 4D Web server in a secured mode — in Mac OS X, the use of TCP/IP ports reserved for Web publications (0 to 1023) requires specific access privileges: only the root user can launch an application using these ports. In order for standard users to be able to launch the Web server, one solution is to modify the port numbers (see the Web server configuration and connection management section). You can pass any valid value (in order to avoid access restrictions in Mac OS X, you should pass a value greater than 1023). For more information about port numbers, refer to the HTTP Port paragraph above.
Compatibility Note: This option is deprecated as for 4D v18. For database access through HTTP, it is now recommended to use ORDA remote datastore features and REST requests.
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. The access path must be set up in relation to the default HTML root folder. In order to ensure multi-platform compatibility of your databases, the 4D Web server uses particular writing conventions to define access paths. The syntax rules are as follows:
folders are separated by a slash (“/”)
the access path must not end with a slash (“/”)
to “go up” one level in the folder hierarchy, enter “..” (two periods) before the folder name
the access path must not start with a slash (“/”)
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 QR SET DESTINATION is called. It is up to you to process the request procedurally.