How to Switch the Default Web Server
ServBay supports using Caddy, NGINX, or Apache as web servers, allowing users to easily switch their default web server.
Important Note
Currently, the feature of using multiple web servers is not available; users can only use one web server at a time. Once a web service is set as the default web server, the other web services will be automatically disabled.
For example, if the user sets NGINX
as the default web server, then Caddy
and Apache
will be automatically disabled and cannot be enabled in the service.
Overview
ServBay comes with built-in support for Caddy
, NGINX
, and Apache
as web servers, allowing users to choose the necessary web server and switch at any time.
During the switching process, ServBay will automatically convert and generate the configuration for the corresponding web server, so users do not need to worry about writing configuration files.
Note ⚠️
If the user has created a custom configuration file for the website (for example, Caddy), this website will not be able to automatically convert to the configuration files of other servers (such as NGINX). The user needs to manually modify the custom configuration file for the chosen web server's configuration.
For example, if the user has used a custom configuration code specifically for NGINX
on website A, then website A can only be used with NGINX
, and cannot be used with Caddy
or Apache
.
During the conversion process, warnings will be displayed to alert the user.
Setting Default Web Server to Caddy
Caddy service is included in the ServBay Runtime, and users can set it as the default web server without additional installation.
Setting Default Web Server to NGINX
If the user wants to set the default server to NGINX, they must first install NGINX. Open Services
- Common Services
, click the green button on the right side of NGINX
to install it.
Setting Default Web Server to Apache
If the user wants to set the default server to Apache, they must first install Apache. Open Services
- Common Services
, click the green button on the right side of Apache
to install it.
Setting Method
Below is the process to set NGINX
as the default web server.
Setting the default web server is very simple. Users just need to open Settings
- Default Web Server
, select the desired web server from the drop-down list, for example, NGINX
. Then click Apply
.
WARNING
Note: As mentioned earlier, users need to install NGINX first. If NGINX is not installed, the drop-down list will not allow selection or change of the default web server.
Then, ServBay will automatically carry out the website configuration migration, with a progress bar indicating the migration status, including any failed migrations.
Once the website migration is completed, the chosen web server will be automatically enabled, and other non-default web servers will be disabled.
Troubleshooting
If there are any issues during the migration process, please refer to the article Web Service Troubleshooting Guide