modify-web

Change a virtual server's web configuration

This script can update the PHP and web forwarding settings for one or more virtual servers. Like other scripts, the servers to change are selecting using the --domain or --all-domains parameters.

To change the method Virtualmin uses to run CGI scripts, use the --mode parameter followed by one of mod_php,
cgi or fcgid. To enable or disable the use of Suexec for running CGI scripts, give either the --suexec or --no-suexec parameter.

The --proxy parameter can be used to have the website proxy all requests to another URL, which must follow --proxy. To disable this, the --no-proxy parameter must be given.

The --framefwd parameter similarly can be used to forward requests to the virtual server to another URL, using a hidden frame rather than proxying. To turn it off, using the --no-framefwd option. To specify a title for the forwarding frame page, use --frametitle.

If your system has more than one version of PHP installed, the version to use for a domain can be set with the --php-version parameter, followed by a number (4 or 5).

If Virtualmin runs PHP via fastCGI, you can set the number of PHP sub-processes with the --php-children parameter, or turn off the automatic startup of sub-processes with --no-php-children. Similarly, the maximum run-time of a PHP script can be set with --php-timeout,
or set to unlimited with --no-php-timeout.

If Ruby is installed, the execution mode for scripts in that language can be set with the --ruby-mode flag, followed by either --mod_ruby, --cgi or --fcgid. This has no effect on scripts using the Rails framework though, as they always run via a Mongrel proxy.

You can also replace a website's pages using one of Virtualmin's content styles, specified using the --style parameter and a style name (which the list-styles command can provide). If so the --content parameter must also be given, followed by the text to use in the style-generated web pages.

To enable the webmail and admin DNS entries for the selected domains (which redirect to Usermin and Webmin by default), the --webmail flag can be used. This will make both the DNS and Apache configuration changes needed. To turn them off, use the --no-webmail flag.

To have Apache configured to accept requests for any sub-domain, use the --matchall command-line flag. This will also add a * DNS entry if needed. To turn this feature off, use the --no-matchall flag.

To make a virtual server the default served by Apache for its IP address, use the --default-website flag. This lets you control which domain's contents appear if someone accesses your system via a URL with only an IP address, rather than a domain name.

To change the HTTP port the selected virtual servers listen on, use the --port flag followed by a port number. For SSL websites, you can also use the --ssl-port flag.

Command Line Help

Changes web server settings for one or more domains.

virtualmin modify-web --domain name | --all-domains
                     [--mode mod_php|cgi|fcgid]
                     [--php-children number | --no-php-children]
                     [--php-version num]
                     [--php-timeout seconds | --no-php-timeout]
                     [--ruby-mode none|mod_ruby|cgi|fcgid]
                     [--suexec | --no-suexec]
                     [--proxy http://... | --no-proxy]
                     [--framefwd http://... | --no-framefwd]
                     [--frametitle "title" ]
                     [--style name]
                     [--content text|filename]
                     [--webmail | --no-webmail]
                     [--matchall | --no-matchall]
                     [--default-website]
                     [--access-log log-path]
                     [--error-log log-path]
                     [--document-dir subdirectory]
                     [--port number] [--ssl-port number]