Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide concerns the task planner, a feature that allows you to run scripts on Web hosting at the time and frequency of your choice to automate repetitive tasks.
Also take note of this other guide if you are looking for information about crontab (crons via SSH) on Cloud Server.
Access the task planner (webcron)
To access the task planning tool:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on Web in the left side menu.
- Click on Task Planner in the left side menu:
- Click on Tasks in the left side menu.
- Existing crons and running tasks are displayed under the 2 tabs of the page:
- Click on the button Planning a task in order to create a planned task by specifying in particular whether the URL of the script to be executed is password protected, if you wish to receive notifications, etc.
- Don't forget to activate the task with the toggle switch.
Minimum intervals
You can plan the cron at a minimum interval of:
- 15 minutes with one shared hosting
- 1 minute on Cloud Server
This guide explains how to access phpMyAdmin with a Web hosting.
Access phpMyAdmin
To access Web hosting on the Databases part:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on Databases in the left side menu.
- Click on Log in to phpMyAdmin:
- The right server and a temporary user are automatically provided.
- The right server and a temporary user are automatically provided.
You can also click on the action menu 的located to the right of a database user:
- The right server is automatically specified.
- The password to enter is the user of the database ( the one you chose to create MySQL user to redefine if you have forgotten it).
This guide explains how to manage Memcached and in particular whether this cache system works correctly on your Cloud Server Managed.
Prerequisites
- Install Memcached on Managed Cloud Server.
Check Memcached execution
In order to check the proper functioning of Memcached:
Copy the following code to a PHP file:
// connexion au serveur memcache local $fp = fsockopen("localhost", 11211); if ($fp) { // on demande les stats fwrite($fp, "stats "); while (!feof($fp)) { $buf = rtrim(fgets($fp)); if (preg_match('/^STAT curr_items ([0-9]+)$/', $buf, $matches)) { // le nombre d'items stockes print $matches[1] . PHP_EOL; } elseif (preg_match('/(END|ERROR)/', $buf)) { // fin des stats break; } } fclose($fp); } else { print "Error: cannot connect to local memcached server: $!" . PHP_EOL; }
- Download the PHP file on your hosting.
- Run the PHP file.
The script returns the number of cached items in the server memory.
Enable Memcached on...
Prestashop
Memcached's native integration into the Prestashop application simplifies its configuration. To activate it:
- Access your Prestashop administration space.
- See you in the tab Advanced parameters.
- Select Performance.
- Choose Yes in the drop-down menu under Use cache in the section Cache.
- Select CacheMemcached.
- Add a server by providing the required information such as
- the IP address:
127.0.0.1
- the port:
11211
- weight:
1
- the IP address:
You can check the information by clicking on the "Test server" button before the record at the bottom of the "Cache" section.
Once this step is completed, your PrestaShop app is ready to use Memcached to cache some API calls, database calls and objects.
This guide explains the purpose of the "MySQL Prefix" option in a site's settings and its implications for the operation of your Web applications (CMS) and PHP scripts.
Preamble
- When the "MySQL Prefix" option is enabled for a site, it is no longer necessary to add the prefix "
wxyz_
" before the name and users of your MySQL databases. - A PHP script will thus be able to connect to MySQL with the user "monuser" and a database "mabase," and access will automatically be performed with the user "wxyz_monuser" and the database "wxyz_mabase".
- ⚠ If you are migrating from an older Infomaniak offer:
- After migrating a site from the old console, the "MySQL Prefix" option is enabled by default to automatically maintain the connection of your Web applications (WordPress, Joomla, Drupal, etc.) and PHP scripts with your MySQL databases.
- To ensure the proper functioning of your sites in the event of a migration of your hosting to another server, it is strongly recommended to disable this function and make the necessary adjustments.
Managing the MySQL Prefix Option
Going Further with Environment Variables
It is possible to configure environment variables directly from the Manager for your entire website:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the assigned name of the relevant product:
- Click on Manage under Advanced settings:
- Click on the PHP / Apache tab.
- Enable or disable the toggle switch MySQL Prefix.
- Click the Save button:
- Make the necessary adjustments in the configuration files of your Web applications and PHP scripts…
Implications and Adjustments to Make
After disabling the MySQL Prefix option for a site, some PHP scripts or CMS may no longer function. To restore the connection to your databases, you must update the following information in the configuration file(s) of the affected scripts:
- The name of the MySQL database: you will need to add your server's prefix
- before:
mabase
- after:
wxyz_mabase
- before:
- The user of the MySQL database: you will need to add your server's prefix
- before:
monuser
- after:
wxyz_monuser
- before:
This guide is about IP addresses, those...
- ... assigned to sites/accommodation/servers, dynamic or static IP, shared or dedicated,
- ...assigned by your Internet Access Provider (ISP) when establishing an Internet connection to your Infomaniak product.
Preamble
- A dedicated or static IP address for a website is a permanent IP address specifically assigned to it.
- Unlike a shared IP address, which is used by several websites, a dedicated IP address ensures that only this platform is associated with that address.
- Dedicated IP addresses for websites are often used in cases where stability, customization and security are important, such as server hosting, firewall configuration or SSL certificate activation (even if it is possible to proceed without dedicated IP address for install an SSL certificate).
- The main advantages are:
- Configure a PTR input or DNS reverse on dedicated IPs, is useful in particular for the installation of an email server because some email providers check the PTR record before accepting emails sent from a server.
- Better stability of the connection.
- Reduced risk of bad reputation associated with websites sharing the same IP address.
- Ease of configuration of certain technical aspects.
- A dedicated IP can improve the SEO of a website (although there are divergent opinions among SEO specialists).
- Attention: Infomaniak does not allow access to websites via HTTP(S) by IPs (dedicated) on managed servers; you must use a domain name which points to the IP (or use preview URL).
Add a dedicated IP to the website
To add a dedicated IP to your website take note of this guide.
In case of concern if you direct web traffic to a defined port, take notice of this other guide.
IP address blocking (Internet connection)
If you can no longer consult...
- ... all your email addresses that you own with Infomaniak (which usually works well) and this with software/mail client since one and the same Internet network (i.e. from the same IP address provided by your ISP)...
... or if you have unfortunately performed this type of operation:
- repeated attempts at unsuccessful connectionsby FTP, SSH, or on access points such as WordPress login...
- requests returning too many errorsLike 403 errors in mass...
... your access to Infomaniak servers may be blocked following the banning of the IP address (banip / ipban) of your internet connection.
In order to unblock the situation, contact Infomaniak support by e-mail and specifying the field concerned and above all your public IP address concerned.
Final release (white list IP)
With a Cloud Server, you can ask in addition to allowing Definitely the IP address concerned so that the blocking never happens again regardless of the situation. To do this, you must:
- Having a dedicated IP associated with your Cloud Server.
- Be aware that Infomaniak will no longer block possible attacks from this IP ; malicious access attacks or attempts from this address will no longer be automatically blocked by security systems.
- Confirm by email and from a contact address associated with the account (owner or administrator) that you understand and accept full responsibility for an attack from this IP.
This guide concerns MySQL/MariaDB and more specifically index analyses and queries with the Web hosting.
Slowlog for long queries
The slowlog MySQL is enabled on all MySQL servers and groups queries that take more than 5 seconds* to run. If your queries are well built, you will never see those files. Otherwise, consult regularly to correct any defects and thus ensure the proper functioning of your site.
Contact Infomaniak Support in writing in order to obtain them (except for old accommodation v1 directly accessible from the FTP File Manager a level above /web
in the directory /logs
).
What about the logs?
None log MySQL is not created (apart from slowlogs) because MySQL servers would not bear the burden of millions of simultaneous logs to save. In case of need, Infomaniak can activate this MySQL log for 5 minutes to allow you to analyze them with EXPLAIN
and to determine useful indexes e.g. To this end, contact Infomaniak support in writing.
* of elapsed time. And regarding locks, the documentation provides the following precision: "The time to acquire the initial locks is not counted as execution time"
This guide explains how to change a password FTP or FTP / SSH account for the site of a Web hosting Infomaniak.
Change the password of an existing FTP user
In order to access the website on a Web Hosting to modify its FTP access:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on FTP / SSH in the left side menu.
- Click on the action menu ⋮ to the right of the user concerned in the table that appears.
- Click on Amend:
- Enter directly the new password that will be used when accessing via FTP or SSH access.
- If necessary you can generate a strong password.
- Confirm changes:
This guide helps to solve a possible 530 error by reducing the number of simultaneous FTP connections to Web hosting.
Solve an error 530
Error message 530 Sorry, the maximum number of clients (25) for this user are already connected
usually appears as a result of multiple and simultaneous connections with an FTP software/client that mishandles disconnections or tries to open multiple connections at the same time thinking about speeding up the download.
Once you get this error, you must close the FTP program then wait 30 minutes so that the server shuts down active connections and you can reconnect.
You can also create a new FTP user and connect with it.
To avoid this situation with FileZilla, go to the menu Edit -> Configuration then under the tab Transfers and adjust the number of simultaneous transfers to 2.
It is recommended to use the FTP File Manager.
This guide explains how to remove an alias domain from a Web hosting Infomaniak. The main domain name of the site will then no longer be related any other domain name.
In particular, this allows for the creation of a new web hosting or separate site for the related domain name.
Prerequisites
- Having dissociated the synonym domain name the main domain name if there was a prior association.
Remove domain alias
To remove an alias domain name from your site:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned:
- Then click on the chevron to develop the game Areas of this site.
- Click on the action menu ⋮ to the right of the domain to be removed.
- Choose Untie:
- Confirm the removal of the alias.
This guide explains how to format and then mount the volume dedicated to storing your data on the VPS Cloud Linux/Unix.
Disk and Partition Names
The VPS Cloud comes with two volumes:
- 1 volume for the operating system of your choice
- 1 volume for storing your data
The volume for data storage must be formatted and then mounted by the client.
In Linux systems, disks and partitions are referenced by names, which may vary depending on the Linux distribution, such as:
/dev/sda
,/dev/sdb
, …/dev/vda
,/dev/vdb
, …/dev/sda1
,/dev/sda2
, …
These names are not static and can change due to various factors, such as the driver used (e.g. virtio-scsi or virtio-blk) or kernel and udev updates.
Therefore, it is recommended to use the UUID (Universal Unique Identifier - see below) of a partition rather than its name when referencing it in the file system configuration file (/etc/fstab
).
Formatting the Storage Volume
If you choose XFS, for example, you need to install the appropriate tools (if they are not already present):
sudo apt install xfsprogs
Then format the volume with the following SSH commands:
sudo mkfs.xfs -f /dev/[device]
And if you choose EXT4:
sudo mkfs.ext4 /dev/[device]
If necessary, it is possible to format the volume with another file system supported by your distribution.
Mounting the Storage Volume
Warning: if you mount your data volume to /home
, you will not be able to reconnect to your server via your private key on the next reboot (because SSH will look for keys in the .ssh
folder in the user's home directory, and if the data volume is mounted on this folder, the keys are lost). Therefore, it is necessary to copy the data to keep beforehand. SSH connection help
For example, as root:
mkdir /mnt/home
mount /dev/[device] /mnt/home
rsync -rlptgoDHAX /home/ /mnt/home/
umount /mnt/home
mount /dev/[device] /home
rmdir /mnt/home
This is what it does in order:
- we create a temporary folder
- we mount the volume on the temporary folder
- we copy the content of the original
/home
folder to the root of the volume, keeping the rights, owner, group, etc. (note that you may need to install thersync
package depending on your chosen Linux distribution) - we unmount the volume from the temporary folder
- we mount the volume on the
/home
folder - we delete the temporary folder
In this way, you should be able to mount the volume to /home
while keeping the initial configuration installed. However, it is recommended to always set a password for root
to avoid losing control in case of error. The password can be removed later.
Alternative Solution: Don't mount in /home...
This is a standard location to mount the data volume because users usually work and especially store their data in /home
. A user without special rights will normally be limited to their /home/user
directory. It is possible to set another default directory for a user (but the configuration will no longer be "standard").
Another Alternative Solution: Automatic mounting at startup...
A mount does not persist across a reboot. If you want to make the change persistent, you can add your volume to the /etc/fstab
file (Debian documentation on this), for example:
/dev/md0 / ext4 errors=remount-ro 0 1
UUID=181A-4B53 /boot/efi vfat errors=remount-ro,nofail 0 0
UUID=181B-AED3 /boot/efi2 vfat errors=remount-ro,nofail 0 0
UUID=[UUID1] /srv/node/sda xfs noatime,nodiratime,nofail,logbufs=8 0 0
UUID=[UUID2] /srv/node/sdb xfs noatime,nodiratime,nofail,logbufs=8 0 0
After formatting the disk, find the UUID and add it to the fstab
.
Get the UUID of a Partition
To obtain the UUID of a partition after formatting, use the blkid
command. This command displays the UUID as well as other information about all partitions detected by your system.
Adding the UUID to fstab
Once you have obtained the UUID of the partition you want to mount automatically at startup, you can add it to your fstab
file. To do this, open the fstab
file with a command-line text editor (e.g., nano or vi) and add a new line for your partition using the example above as a template. Replace [device]
, [UUID1]
, and [UUID2]
with the appropriate values for your configuration.