2015년 6월 24일 수요일

[php] increase max upload size (wordpress)




PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)

php.ini

upload_max_filesize = 32M
post_max_size = 32M

then httpd restart




http://stackoverflow.com/questions/13442270/ini-setupload-max-filesize-200m-not-working-in-php

[apache] change run user, group

cakephp3 Permission denied error




/etc/apache2/envvars

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.

##export APACHE_RUN_USER=www-data
##export APACHE_RUN_GROUP=www-data
## 아파치 유저 변경
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data


service apache restart







[cakephp] not found the requested url (apache)



/etc/apache2/sites-available/default


<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory /var/www>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order Allow,Deny
    Allow from all
</Directory>



http://book.cakephp.org/3.0/en/installation.html#url-rewriting



[vagrant] synced folder owner change (apache)




vagrant file edit

## 공유 폴더 권한 변경

#config.vm.synced_folder "./source", "/var/www/source", create: true
config.vm.synced_folder "./source", "/var/www/source", create: true,
      :owner => "vagrant",
      :group => "www-data",
      :mount_options => ["dmode=775","fmode=664"]



$ vagrant reload