Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx config client_max_body_size #231

Closed
ErisDS opened this issue Jun 26, 2017 · 4 comments · Fixed by #272
Closed

Nginx config client_max_body_size #231

ErisDS opened this issue Jun 26, 2017 · 4 comments · Fixed by #272

Comments

@ErisDS
Copy link
Member

ErisDS commented Jun 26, 2017

Nginx defaults to a max body size of 1mb, which isn't great for image and theme uploads.

I have been adding client_max_body_size 50m; as part of the install process for nginx before running ghost-cli.

On a fresh nginx install, I do this by adding the line after types_hash_max_size 2048; in /etc/nginx/nginx.conf. Ansible has a lovely tool called "lineinfile" that I wonder if we can reproduce?

I wonder if we should either document this, or get ghost-cli to attempt to set it?

@kirrg001 kirrg001 added this to the 1.0.0-rc.1 milestone Jun 26, 2017
@kirrg001 kirrg001 added the docs label Jun 26, 2017
@acburdine
Copy link
Member

Something that might be possible to add to the nginx configuration setup is something with command args - e.g. --nginx_client_max_body_size "50m" will add that rule to the nginx config.

Since yargs doesn't throw on extraneous args we should be able to do something like this for various nginx rules.

@ErisDS
Copy link
Member Author

ErisDS commented Jun 26, 2017

Not sure I follow what you mean? This isn't a custom config that I want, but something that most people would need. The default is 1mb, which isn't really big enough to do any sort of image upload 😁

@acburdine
Copy link
Member

Apologies - should have made that a bit more clear 😬

Definitely agree with adding the max_body_size config rule. The command line args thing would work for other use-cases of adding special rules on a per-conf bases.

@kirrg001
Copy link
Contributor

I have referenced this issue in the improvements section in #216.

aileen added a commit to aileen/Ghost-CLI that referenced this issue Jul 5, 2017
closes TryGhost#231

Adds `client_max_body_size 50m;` to nginx config file.
aileen added a commit to aileen/Ghost-CLI that referenced this issue Jul 5, 2017
closes TryGhost#231

Adds `client_max_body_size 50m;` to nginx default config file.
aileen added a commit to aileen/Ghost-CLI that referenced this issue Jul 5, 2017
closes TryGhost#231

Adds `client_max_body_size 50m;` to nginx default config file.
acburdine pushed a commit that referenced this issue Jul 5, 2017
closes #231

Adds `client_max_body_size 50m;` to nginx default config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants