413 Request Entity Too Large | Wordpress Web app

Hardware: VPS bought online
YunoHost version: 4.0.8
I have access to my server : Through SSH

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I’m not having much luck since the upgrade.
Now I’m trying to upload a Wordpress theme 16mb and I’m getting this error
413 Request Entity Too Large
nginx

I search the forums and found this

I looked at /etc/yunohost/apps/wordpress/conf
client_max_body_size 30m;
Is present in nginx.conf

I looked at
/etc/yunohost/apps/my_webapp__5/conf
client_max_body_size 30m;
wasn’t there. I added the line and restarted but the problem persists after a restart nginx

So I used another method, unzipping the file and login into my_webapp with FTP as I used to.
But it seems that permissions have changed and I can’t sFTP to the webapp with my webapp username and password.

I’m sure the solution is simple but I can’t find it!

Could you do a cat /etc/ssh/sshd_config and check mywebapp config is at the end of this file ?

I don’t think it’s there.

The last lines of the file are

  • override default of no subsystems
    Subsystem sftp /usr/lib/openssh/sftp-server

  • Match User anoncvs

  • X11Forwarding no

  • AllowTcpForwarding no

  • PermitTTY no

  • ForceCommand cvs server
    PermitRootLogin without-password

My work around this issue is to amend sshd_config with
PermitRootLogin yes
sftp as root and then change it back once I’ve uploaded. It’s not super practical.

Also, under diagnosis I get this
onfiguration file /etc/ssh/sshd_config appears to have been manually modified.

  • This is probably OK if you know what you’re doing! YunoHost will stop updating this file automatically… But beware that YunoHost upgrades could contain important recommended changes. If you want to, you can inspect the differences with yunohost tools regen-conf ssh --dry-run --with-diff and force the reset to the recommended configuration with yunohost tools regen-conf ssh --force

Should I recreate sshd_config ?

Update…
I did
yunohost tools regen-conf nslcd --force
yunohost tools regen-conf nsswitch --force
yunohost tools regen-conf ssh --force

I still have the 413 Request Entity Too Large issue and the SFTP access denied issue.
I’ll try to find another solution.

I found a solution for this issue but had to change a couple of files
/etc/nginx/nginx.conf

http {
(…)
#set client body size to 20M
client_max_body_size 20M;

/etc/nginx/sites-available/yourwebsite.conf

server {
#set client body size to 20M
client_max_body_size 20M;

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.