PHP max upload size snippets for various hosting/email package requirements

Discussion in 'General' started by Ranzy Campbell, Nov 23, 2022.

  1. Not sure if I'm doing this right but I'm quoting a member from another thread in a new thread because the original thread was answered already. I'm new here
    Are you saying there is a way to have php snippets for various hosting/email package requirements through out on the same server?
    To be honest, I'm not sure how we can have snippets for each Site but not for just /webmail. All I'm saying here is I just don't know how it's done. It's magic to me. If I were to create a LAMP server, I'd only know how to change the global settings anyway. So, I'm certainly not suggesting has to be any different. I'm only asking because it seemed like you were suggesting it was possible. If it's possible I'd like to look into it.
    I haven't started selling anything on my server yet, because I want to have all of my ducks in a row before I accept any money from a stranger to host websites and definitely email. For some reason, for me, Apache web serving seems a little bit easy to manage without a GUI, but email is a bit tougher to get it right. ISPConfig took ALL the work out of it. I literally just click and add email hosting. And for some reason the PHP Group sets a tiny limit for default max upload size. Yes, I can just set the limit to 64MB globally and that would most likely solve all perceived problems. It would make Wordpress happy for any new client install and would also fix the tiny limit for email uploads being arbitrarily limited to 2MB. Most likely that's all that needs to be done.
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    under the options tab on websites, you can set php and apache/nginx directives specifically for that site.

    as ispconfig admin, under system - directive snippets, you can preset a load of these, eg, set apache docroot to /web/public. set php memory limits to 64mb, 128mb, 256mb, set upload size to 10mb, 25mb 50mb 100b etc. all in individual snippets, and have those viewable by the customer, so they can apply whatever one they need (otherwise they need to request admin (you) to set them for them)

    this only applies for websites though, not for emails.
    if you set the global variable for webmail to /webmail then a customer may use http(s)://customerdomain.tld/webmail to access webmail, which i believe will apply the php limits set for their own site to webmail.
    otherwise, you could just have a vhost for webmail (webmail.yourmaindomain.tld) and have a fixed limit for everyone using that vhost.
    not sure about setting individual email size limits per mailbox though, might have to install and configure something like policyd to get that into postfix.
     
  3. Thank you for the excellent response. This is basically a pro-tip. I think you've sent me in the right direction.
    Have a great day.
     

Share This Page