Maxscape Server Configuration
The Maxscape server operates in various configurations and modes.
- Apache and Maxdaemon HTTP Server Versions
- MySql, Mariadb or Other Databases
- Perl Interpreter Version
- IP or Name Based Virtual Hosts
- Development and Production Environments
- ...
Server Global Configuration
The global configuration files define the directives and properties, that are common to all installed application servers. For example, to configure the Apache and the Maxdaemon HTTP servers, the other part systems (Mysql, Mariadb, Openssl, Perl, ...) and the installed application servers. The most important global configuration files are located under the '/maxscape/etc' directory:
/maxscape/etc maxscape.cnf # Maxscape global configuration. httpd.conf # Apache global configuration. maxdaemon.conf # Maxscape control daemon configuration. profile # Default shell environment. skel/.profile # Unix user shell environment. skel/.tcshrc # Tcsh resource file.
Shell Environment and Libraries
The global shell environment is configured in the file '/maxscape/etc/profile', which is executed by the Maxscape Unix users '~/.profile'. It defines the default environment variables and the part system versions. The environment can be modified by the 'sp' set project script. Adapt these files to meet your project's requirements.
/maxscape/etc/profile # Default Shell environment. ~/.profile # Maxscape Unix user profile. ~/.tcshrc # Unix user Tcsh resource file. /maxscape/cvssh/sp # Set project script
Set up the platform part systems libraries permanently or temporarily, e.g.:
> v /etc/ld.so.conf
/opt/ssl/3.2.0/lib64
/opt/apache/2.4.58/lib
/opt/mariadb/10.11.7/lib
> ldconfig /etc/ld.so.conf.d/*.conf /opt/ssl/3.2.0/lib64 \
/opt/apache/2.4.58/lib /opt/mariadb/10.11.7/lib
Application Server Configuration
The application server's configuration files are located under their related directories:
/maxscape/server/MyAppServer1/etc maxscape.cnf httpd.conf maxdaemon.conf ssl /maxscape/server/MyAppServer2/etc maxscape.cnf httpd.conf maxdaemon.conf ssl /maxscape/<application server name>/etc ...
Apache Configuration
The main Apache configuration file is '/maxscape/etc/httpd.conf'. This file includes the configured application servers via 'include' directives. Application servers are configured as virtual hosts.
# File: /maxscape/etc/httpd.conf. # Each application server's website is configured as a virtual host. ... Include /maxscape/server/Maxscape/etc/httpd.conf Include /maxscape/server/<application server name>/etc/httpd.conf ... Include /maxscape/server/WebServer/etc/httpd.conf
All application servers have their own Apache configuration file included by the global httpd.conf. For example, to define an application process, use the FCGI FcgidCmdOptions directive in the 'httpd.conf' file of your <application server>. Adjust other directives as described in the Apache documentation.
# File: /maxscape/etc/httpd.conf.
...
FcgidMinProcessesPerClass 3
FcgidMaxProcessesPerClass 100
FcgidMaxRequestsPerProcess 10000
FcgidProcessLifeTime 86400
FcgidMaxRequestLen 3000000000
FcgidMaxRequestInMem 3000000000
FcgidIPCDir /maxscape/var/tmp/fcgidsock
FcgidProcessTableFile /maxscape/var/tmp/fcgid_shm/fcgid_shm
...
# File: /maxscape/server/<application server>/etc/httpd.conf.
...
FcgidCmdOptions /maxscape/server/<application server>/docs/www.fcg
InitialEnv PROJECT_SERVER_NAME=Maxscape
...
Maxdaemon Configuration
To run Maxscape with the Maxdaemon HTTP server, you'll need to install the Maxdaemon server.
# Configuration file for the application server /opt/maxdaemon/1.0.0/daemon/etc/maxdaemon-maxscape.local.net.conf # Configuration file for the administration server /opt/maxdaemon/1.0.0/daemon/server/WebServer/etc/maxdaemon-maxdaemon.local.net.conf
Openssl Configuration
The Openssl certificates needs to be created or purchased to run the Maxscape HTTPS servers. Self-signed SSL certificates can be created with Maxdaemon's certificate script. The application server's Openssl certificate files are located under their related etc/ssl directories and must be configured in the HTTPD configuration files:
# Directory: /maxscape/server/<application server>/etc/ssl ... server.crt server.key ... # Files: /maxscape/server/<application server>/etc/httpd.conf # /maxscape/server/<application server>/etc/maxdaemon.conf ... SSLCertificateFile /maxscape/server/<application server>/etc/ssl/server.crt SSLCertificateKeyFile /maxscape/server/<application server>/etc/ssl/server.key ...
Webserver Configuration Run-Time API
The configuration data is provided by the $::WebServer run-time object. It can be accessed within applications via e.g.:
# File e.g.: /maxscape/server/Maxscape/lib/perl/Maxscape/ServerApplication.pm
my $defaultContentType = $::WebServer->{'Page.defaultContentType'},
my $TimeAsString = $::WebServer->TimeAsString ($Time);
| Next ∙ Previous ∙ Top ∙ Join ∙ Contact | © Maxscape |
