Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

How To Change Local Settings ? Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
17 posts
  • 1
  • 2
  • Next
msk19994
Posts: 23
Joined: Thu Jun 05, 2014 5:55 am

How To Change Local Settings ?
  • Quote

Post by msk19994 » Sat Jun 07, 2014 11:56 am

Hey Guys
I am trying to upload a file more than 2MB but it wont upload, I have selected the default package with the default apache template, i have edited the /etc/php.ini and inserted the details regarding max file size etc but it wont seem to work ie
example
http://fool.pk/phpinfo.php
You can see Master and Local . Where to edit that stupid local 2M i tried editing the
/usr/local/vesta/php/lib/php.ini

thinking it might be the local one but even after the service httpd restart it doesnt seem to change the 2M
It would be great if someone could help me out here
Thanks :)
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: How To Change Local Settings ?
  • Quote

Post by imperio » Thu Jun 26, 2014 6:49 pm

Hi,
i tried editing the
/usr/local/vesta/php/lib/php.ini
don't change this file, this file for vestacp

What operating system on your server ?
Top

alanms
Posts: 15
Joined: Sun Aug 16, 2015 12:03 pm

Re: How To Change Local Settings ?
  • Quote

Post by alanms » Mon Mar 14, 2016 6:16 pm

I don't know why the Vesta team can't just answer a simple question.

The "Local" settings are coming from Vesta's web profile templates. It's a "feature" that gives you settings you didn't ask for without telling you it's doing so. More info here viewtopic.php?t=4328

When you set up a new site in the "web" tab, you were given an unexplained dropdown menu with options like "default", "basedir", "hosting", "phpcgi" and "phpfcgid".

Each one of these corresponds to a secret settings override .tpl file hidden in /usr/local/vesta/data/templates/web/httpd

These override your php.ini settings with "local" settings, leaving no clue as to where the local settings came from. For example, if you chose "hosting", it forces this into your local Apache settings:

Code: Select all

            <Directory %docroot%>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value upload_tmp_dir %home%/%user%/tmp
        php_admin_value upload_max_filesize 10M
        php_admin_value max_execution_time 20
        php_admin_value post_max_size  8M
        php_admin_value memory_limit 32M
        php_admin_flag mysql.allow_persistent  off
        php_admin_flag safe_mode off
        php_admin_value session.save_path %home%/%user%/tmp
        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%'
    </Directory>
If you just want to use global settings, "Default" is the option to chose. It doesn't change any PHP settings (but it does change some other Apache settings).
Top

obouncetech
Posts: 6
Joined: Sat Sep 17, 2016 1:55 pm

Re: How To Change Local Settings ?
  • Quote

Post by obouncetech » Mon Aug 21, 2017 5:48 am

@alanms Thank you so much. This saved me an headache of about 4 days already.
Top

xguntis
Posts: 30
Joined: Sat Mar 12, 2016 12:42 pm

Re: How To Change Local Settings ?
  • Quote

Post by xguntis » Thu Feb 01, 2018 7:59 am

Editing config files in /usr/local/vesta/data/templates/web/apache2 changes the master value, but how to change local value, which differs from master?

EDIT: added following lines to .htaccess of the website i am testing, but it did not help.

Code: Select all

php_value upload_max_filesize 64M
php_value post_max_size 64M
Image
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: How To Change Local Settings ?
  • Quote

Post by mehargags » Thu Feb 01, 2018 5:53 pm

Just edit your corresponding /etc/php ini file to make changes global irrespective of the template used if you need it serverwide.
Top

xguntis
Posts: 30
Joined: Sat Mar 12, 2016 12:42 pm

Re: How To Change Local Settings ?
  • Quote

Post by xguntis » Fri Feb 02, 2018 8:18 am

mehargags wrote:Just edit your corresponding /etc/php ini file to make changes gloabal irrespective of the template used if you need it serverwide.
I guess you misunderstood me.

I am using the hosting template where there is /usr/local/vesta/data/templates/web/apache2/hosting.tpl file that is responsible for configuring global values like this:

Code: Select all

php_admin_value upload_max_filesize 64M
php_admin_value post_max_size  64M
And the global values are 64M as you can see in the screenshot in my previous post. I am looking where to increase the local values.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: How To Change Local Settings ?
  • Quote

Post by mehargags » Fri Feb 02, 2018 10:23 am

I still don't understand your question... Local values for what ?
You want to restrict values through tpl files ? You can setup the Apache directives in the the specific tpl/stpl files
or
you can use .htaccess
Top

xguntis
Posts: 30
Joined: Sat Mar 12, 2016 12:42 pm

Re: How To Change Local Settings ?
  • Quote

Post by xguntis » Fri Feb 02, 2018 12:59 pm

On the attached screenshot (this is from phpinfo();) you see the left column for post_max_size is 8M (local value) and on the right column 64M (master value). I want the local value to be 64M. As I wrote above .htaccess did not help.

Image
Top

noogen
Posts: 66
Joined: Thu Jan 05, 2017 9:20 pm

Re: How To Change Local Settings ?
  • Quote

Post by noogen » Fri Feb 02, 2018 1:45 pm

@xguntis it is as you've describe. You either change it in the hosting.tpl and hosting.stpl or don't use the hosting template. Use another template that does not have the setting of php_admin_value post_max_size 8M
Top


Post Reply
  • Print view

17 posts
  • 1
  • 2
  • Next

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password