Deploying PHP apps

Zeabur supports not only traditional multi-file PHP apps with index.php as the entry point but also offers one-click deployment for frameworks like Laravel, ThinkPHP, CodeIgniter, etc.

Customizing php.ini Settings

Use Zeabur's config file editor to create a configuration file under /usr/local/etc/php/conf.d with the extension ini. You can directly write the PHP settings you wish to override in this file.

For example, if you want to set the maximum file upload size to 100MB, you can create a file /usr/local/etc/php/conf.d/upload.ini with the following content:

upload_max_filesize = 100M

Customizing NGINX Configuration

Use Zeabur's config file editor to create a configuration file at the path /etc/nginx/sites-enabled/default, which overrides the default NGINX configuration on Zeabur.

If you'd like to tweak the NGINX configuration based on the existing configuration, you can download the current NGINX configuration file used by Zeabur from the zbpack NGINX configuration repository (opens in a new tab), and make your modifications on that basis. For example, if you wish to disable gzip compression, you can change the template's gzip_static on; to gzip_static off;.

server {
    # see https://github.com/zeabur/zbpack/blob/main/internal/php/nginx-conf/default.conf

    location / {
        try_files $uri $uri/ /index.php?$query_string;
        gzip_static off;  // disable gzip compression
	}
}