Z
Zerops3mo ago
minsomai

413 Content Too Large

I'm not exactly sure if it is zerops or my code, but I'm getting this error I've already updated in code to allow upto 2GB file and in the site_config.tmpl too. I'd like to know if this is correct way to configure nginx in nodejs image
server {
listen 80 default_server;
listen [::]:80 default_server;

server_name _;
root {{.DocumentRoot}};

client_max_body_size 2G;

location / {
try_files $uri $uri/ /index.html;
}

access_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=info default_short;
error_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=error;
}
server {
listen 80 default_server;
listen [::]:80 default_server;

server_name _;
root {{.DocumentRoot}};

client_max_body_size 2G;

location / {
try_files $uri $uri/ /index.html;
}

access_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=info default_short;
error_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=error;
}
zerops:
- setup: nodejs
# ==== how to build your application ====
build:
# what technologies should the build
# container be based on (can be an array)
base: nodejs@22

# what commands to use to build your app
buildCommands:
- pnpm i
- pnpm run build
# select which files / folders to deploy
# after the build successfully finished
deployFiles:
- ./
siteConfigPath: site_config.tmpl
# *optional*: which files / folders
# to cache for the next build run
cache:
- node_modules
- package-lock.json

# ==== how to run your application ====
run:
base: nodejs@22

# what ports your app listens on
# and whether it supports http traffic
siteConfigPath: site_config.tmpl
ports:
- port: 3000
httpSupport: true
disableCompression: true

# start your application
start: pnpm run start
zerops:
- setup: nodejs
# ==== how to build your application ====
build:
# what technologies should the build
# container be based on (can be an array)
base: nodejs@22

# what commands to use to build your app
buildCommands:
- pnpm i
- pnpm run build
# select which files / folders to deploy
# after the build successfully finished
deployFiles:
- ./
siteConfigPath: site_config.tmpl
# *optional*: which files / folders
# to cache for the next build run
cache:
- node_modules
- package-lock.json

# ==== how to run your application ====
run:
base: nodejs@22

# what ports your app listens on
# and whether it supports http traffic
siteConfigPath: site_config.tmpl
ports:
- port: 3000
httpSupport: true
disableCompression: true

# start your application
start: pnpm run start
6 Replies
Jan Saidl
Jan Saidl3mo ago
Hi @minsomai try to update the L7 balancer configuration
minsomai
minsomaiOP3mo ago
hello Jan, we currently don't have custom domain. It is still in development so
Jan Saidl
Jan Saidl3mo ago
You can use the zerops.zone domain like I did in the video.
minsomai
minsomaiOP3mo ago
can we use zerops app subdomain instead of the .zone? @Jan Saidl
Jan Saidl
Jan Saidl3mo ago
The Zerops subdomain goes through a shared Nginx, which has limited resources and settings. This setting from the video will not take effect there. You need to go directly to the project. So either via a domain that leads directly to the project. That's the difference with the *-zerops.zone domain, which has DNS set directly to the project's IPv6 address.
minsomai
minsomaiOP3mo ago
thank you for the information

Did you find this page helpful?