Difference between revisions of "Useful Commands"

From SME Server
Jump to navigationJump to search
Line 20: Line 20:
 
*Allow PHP URL File Open per ibay:
 
*Allow PHP URL File Open per ibay:
  
**Make custom httpd directory if not exist
+
Make custom httpd directory if not exist
 
  mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 
  mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
  
**Create the template name <b>99allow_url_fopen</b> and put the content
+
Create the template name <b>99allow_url_fopen</b> and put the content
 
  <Directory /home/e-smith/files/ibays/IBAYNAME/html>
 
  <Directory /home/e-smith/files/ibays/IBAYNAME/html>
 
  php_admin_flag allow_url_fopen on
 
  php_admin_flag allow_url_fopen on
Line 29: Line 29:
 
Save the file
 
Save the file
  
**Expand
+
Expand
 
  expand-template /etc/httpd/conf/httpd.conf
 
  expand-template /etc/httpd/conf/httpd.conf
  
**Restart httpd.
+
Restart httpd.
 
  /etc/init.d/httpd-e-smith restart
 
  /etc/init.d/httpd-e-smith restart
 
   
 
   

Revision as of 16:10, 13 March 2007

Useful Commands

Apache Related Commands

  • Expand httpd.conf template:
expand-template /etc/httpd/conf/httpd.conf


  • Restart httpd:
/etc/init.d/httpd-e-smith restart


  • To leave Apache reads the distributed configuration file .htaccess per ibay:
db accounts setprop IBAYNAME AllowOverride All
signal-event ibay-modify IBAYNAME


  • Allow PHP URL File Open per ibay:

Make custom httpd directory if not exist

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

Create the template name 99allow_url_fopen and put the content

<Directory /home/e-smith/files/ibays/IBAYNAME/html>
php_admin_flag allow_url_fopen on
</Directory>

Save the file

Expand

expand-template /etc/httpd/conf/httpd.conf

Restart httpd.

/etc/init.d/httpd-e-smith restart


PHP Related Commands

  • Expand php.ini template:
expand-template /etc/php.ini


  • Configure PHP Basedir Restriction per ibay:
db accounts setprop IBAYNAME PHPBaseDir DIR1:DIR2:DIRn
signal-event ibay-modify IBAYNAME

Example

db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary:/tmp
signal-event ibay-modify Primary


  • Execution Time:
db configuration setprop php MaxExecutionTime ZZ
expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart

where ZZ is the time in seconds.


  • Memory Limit:
db configuration setprop php MemoryLimit XX
expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart

where XX is the amount of memory in Mb.


  • Upload Max File Size:
db configuration setprop php UploadMaxFilesize WW
expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart

where WW is the file size in Mb.


  • Allow URL FOpen:

Not secure. Instead use per ibay or directory.