How to change default website
Instructions on how to change default website by the hostname or IP address.
To edit default index file:
Go to Folder
vi /usr/local/apache/htdocs/
and edit index.html file
Apache Logs are in:
vi /usr/local/apache/logs/
Excessive resource usage: clamupdate
Time: Tue Jun 22 19:06:10 2021 +0600
Account: clamupdate
Resource: RSS Memory Size
Exceeded: 831 > 256 (MB)
Executable: /usr/bin/freshclam
Command Line: /usr/bin/freshclam –quiet
PID: 15461 (Parent PID:15440)
Killed: No
add /usr/bin/freshclam to / etc / csf / csf.pignore
And then restart the firewall
csf -r
That’s all
Changing the partition layout of your VPS and VDS after installation | Linux
- How to easily change your partition layout on your VPS or VDS.
Backup of all important data before proceeding! Changes to the partition table always bear the risk of complete data loss.
- Boot your VPS / VDS into the rescue-system
- Now connect through VNC (How to use VNC to connect to your VPS and VDS)
- Login as “root”
- To perform changes on the partition easily use gparted
- To start the GUI type “startxfce4” within VNC console and wait a few seconds until the graphical interface appears
- On the upper left side you will see “Applications”, open it and select “Run Program”
- Type “gparted” within the application finder and the app should start immediately
- Now you can resize and create new partition with unallocated space.
How to increase memory limit?
- Fatal error: Allowed memory size of 123456 bytes exhausted (tried to allocate 234567 bytes) in /path/file.php
Usually your php.ini will be located at (XX – PHP version, for example 73):
vi /usr/local/php73/lib/php.ini
or use below trick to find your php.ini would be to ask php itself what it’s using, eg:
/usr/local/bin/php --ini | grep 'Loaded Configuration File'
or another trick to find php.ini
php -i | grep "php.ini"
Now open the php.ini file and edit memory_limit to a higher value.
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Save, and then restart apache.
systemctl start httpd.service
CentOS/RHEL (Red Hat) Linux version 7.x or newer specific commands
or
sudo systemctl restart httpd.service
Alternative way: php.ini per folder
Location of the global server php.ini file is
/usr/local/php/php.ini
Location of the global per account php.ini file is
/home/USERNAME/php.ini
You can also have per folder changes, example:
/home/USERNAME/public_html/website1.com/php.ini /home/USERNAME/public_html/website2.com/php.ini /home/USERNAME/public_html/website2.com/myapp/php.ini
How to test php.ini changes?
Simple create phpinfo.php file in the users public_html folder and add the following content in it.
Example location: /home/USERNAME/public_html/phpinfo.php
<?php
phpinfo();
?>
Now open url in your browser (Apache restart is NOT needed):
http://your-domain.com/phpinfo.php
PHP.ini values
http://php.net/manual/en/ini.list.php
- « Previous Page
- 1
- …
- 37
- 38
- 39
- 40
- 41
- …
- 90
- Next Page »