How to Switch the Default Web Server
ServBay supports using Caddy, NGINX, or Apache as a web server, allowing users to easily switch their default web server.
Important Note
Currently, the functionality of using multiple web servers is temporarily not available, and users can only use one web server at a time. Once a certain 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 has Caddy
, NGINX
, and Apache
built in as web servers, allowing users to choose the web server they need and switch at any time.
During the switching process, ServBay will automatically convert and generate the corresponding configuration for the web server, so users don't need to worry about writing configuration files.
Note⚠️
If users have customized configuration files for their websites (such as Caddy), then those websites will not be able to automatically convert to configuration files for other servers (such as NGINX). Users need to manually modify the custom configuration files to match the configuration used by the selected web server.
For example, if a user has a custom configuration 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 prompt the user.
Setting the Default Web Server to Caddy
The Caddy service is included in ServBay Runtime, and users can set it as the default web server without additional installation.
Setting the Default Web Server to NGINX
If a user needs to set the default server to NGINX, they must first install NGINX. Open Services
- General Services
, and click the green button next to NGINX
to install it.
Setting the Default Web Server to Apache
Support for Apache will be released soon, please stay tuned.
Setting Method
Below is an example of setting NGINX
as the default web server.
The process of setting the default web server is straightforward. Users just need to open Settings
- Default Web Server
, select the desired default web server from the dropdown, such as NGINX
, and then click Apply
.
WARNING
Note: As mentioned earlier, users need to install NGINX first. If NGINX is not installed, the dropdown will not allow selection or change of the default web server.
Then, ServBay will automatically migrate the website configuration and provide a progress box to inform users of the migration status, including any failed migrations.
Once the website migration is complete, the selected web server will be automatically enabled, and other non-default web servers will be disabled.
Troubleshooting
If issues occur during the migration process, please refer to the article Web Service Troubleshooting Guide.