Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide concerns the task scheduler, a feature that allows you to run scripts on Web Hosting at the time and frequency of your choice to automate repetitive tasks.
Also refer to this other guide if you are looking for information about crontab (crons via SSH) on Serveur Cloud.
Access the task scheduler (webcron)
To access the task scheduler tool:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on Web in the left sidebar.
- Click on Task Scheduler in the left sidebar:
- Click on Tasks in the left sidebar.
- The existing crons and running tasks are displayed under the two tabs of the page:
- Click the Schedule a task button to create a scheduled task, specifying whether the script URL to be executed is password-protected, if you want to receive notifications, and of course the desired interval (see below), etc.
- Do not forget to activate the task using the toggle switch.
Minimum intervals
You can schedule the cron at a minimum interval of:
- 15 minutes with a shared hosting
- 1 minute on Serveur Cloud
Access the log of the executed task
Click on the action menu ⋮ located to the right of the relevant item to access quick management of your task and its execution log:
This guide explains how to access phpMyAdmin with a Web Hosting.
Access phpMyAdmin
To access the Web Hosting in the Databases section:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on Databases in the left sidebar.
- Click on Log in to phpMyAdmin:
- The correct server and a temporary user are automatically filled in.
You can also click on the action menu ⋮ located to the right of a database user:
- The correct server is automatically filled in.
- The password to enter corresponds to the database user (the one you chose when creating the MySQL user reset if you have forgotten it).
This guide explains how to manage Memcached and, in particular, how to check if this in-memory caching system is working correctly on your Cloud Server.
Prerequisites
- Install Memcached on Managed Cloud Server.
Check Memcached is running
To check that Memcached is working properly:
Copy the following code into 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; }
- Upload the PHP file to your hosting.
- Run the PHP file.
The script returns the number of elements cached in the server's memory.
Enable Memcached on…
… Prestashop
The native integration of Memcached in the Prestashop application simplifies its configuration. To activate it:
- Access your Prestashop admin space.
- Go to the Advanced Settings tab.
- Select Performances.
- Select Yes from the dropdown menu under Use cache in the Caching section.
- Select CacheMemcached.
- Add a server by providing the required information such as
- the IP address:
127.0.0.1
- the port:
11211
- the weight:
1
- the IP address:
You can check the information by clicking the "Test Server" button before saving it at the bottom of the "Caching" section.
Once this step is completed, your PrestaShop application is ready to use Memcached to cache certain API calls, database calls, and objects.
This guide is about IP addresses, those…
- … assigned to websites/hosting/servers, dynamic or static, shared or dedicated,
- … assigned by your Internet Service Provider (ISP) when establishing an Internet connection to your Infomaniak product.
Introduction
- 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 multiple 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 activating SSL certificates (even though it is possible to proceed without a dedicated IP address to install an SSL certificate).
- Here are the main advantages:
- Configuring a PTR record or reverse DNS on dedicated IPs is useful, especially for setting up a mail server, as some email providers check the PTR record before accepting emails sent from a server.
- Better connection stability.
- Reduced risk of a bad reputation due to websites sharing the same IP address.
- Easier configuration of certain technical aspects.
- A dedicated IP can improve a website's search engine ranking (although there are differing opinions among SEO specialists).
- **Warning:** Infomaniak does not allow access to websites via HTTP(S) by IP (dedicated) on managed servers; you must use a domain name that points to the IP (or use the preview URL).
Add a dedicated IP to the website
To add a dedicated IP to your website, refer to this guide.
If you encounter any issues directing web traffic to a specific port, refer to this other guide.
IP address block (Internet connection)
If you can no longer access…
- … all your email addresses that you have with Infomaniak (which usually work well) and this with an email software/client from the same Internet network (that is, from the same IP address provided by your ISP)…
… or if you have unfortunately performed this type of operation:
- repeated unsuccessful connection attempts via FTP, SSH, or on access points such as the WordPress login…
- requests returning too many errors such as mass 403 errors…
… your access to Infomaniak servers may be blocked due to the banning of the IP address (banip / ipban) of your internet connection.
To unlock the situation, contact Infomaniak support by email and specify the domain concerned and especially your public IP address concerned.
Permanent Unblocking (IP Whitelisting)
With a Cloud Server, you can additionally request to permanently authorize the IP address in question so that the block does not recur under any circumstances. To do this, you must:
- Have a dedicated IP associated with your Cloud Server.
- Be aware that Infomaniak will no longer block potential attacks from this IP; attacks or malicious access attempts from this address will no longer be automatically blocked by the security systems.
- Confirm by email and from a contact address associated with the account (owner or administrator) that you understand and accept full responsibility in case of an attack originating from this IP.
This guide explains what the "MySQL Prefix" option is for in a site's settings and what its implications are 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_
" in front of the name and users of your MySQL databases. - A PHP script can thus connect to MySQL with the user "monuser" and a database "mabase" and access will automatically be granted 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 case of migration of your hosting to another server, it is strongly recommended to disable this function and make the necessary adjustments.
Manage 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 name assigned to the product concerned:
- Click on Manage under Advanced Settings:
- Click on the PHP / Apache tab.
- Turn the toggle switch MySQL Prefix on or off.
- 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 the prefix of your server to it
- before:
mabase
- after:
wxyz_mabase
- before:
- The MySQL database user: you will need to add your server prefix to it
- before:
monuser
- after:
wxyz_monuser
- before:
This guide concerns MySQL/MariaDB and more particularly the analysis of indexes and queries with the Web Hosting.
Slow log for long queries
The MySQL slowlog is enabled on all MySQL servers and groups queries that take more than 5 seconds* to execute. If your queries are well constructed, you will never see these files. Otherwise, check regularly to correct any potential issues and ensure the proper functioning of your site.
Contact Infomaniak support in writing to obtain them (except for the old v1 hosting, which can be viewed directly from the FTP Manager one level above /web
in the /logs
directory).
And the logs?
No MySQL log is created (except for slowlogs) as the servers would absolutely not support the load of recording millions of simultaneous logs. If needed, Infomaniak can activate this MySQL log for 5 minutes to allow you to analyze them with EXPLAIN
and determine useful indexes for example. To do this, contact Infomaniak support in writing.
* elapsed time. And regarding locks, the documentation provides the following clarification: "The time to acquire the initial locks is not counted as execution time
This guide helps resolve a potential 530 error by reducing the number of simultaneous FTP connections to Web Hosting.
Resolve error 530
The error message 530 Sorry, the maximum number of clients (25) for this user are already connected
generally appears due to multiple and simultaneous connections with an FTP software/client that poorly manages disconnections or tries to open several connections at once to speed up the download.
Once you have encountered this error, you must close the FTP program and then wait 30 minutes so that the server terminates the 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 -> Settings then under the Transfers tab and set the number of simultaneous transfers to 2.
It is recommended to use the FTP Manager.
This guide explains how to change the password of a FTP or FTP / SSH account for a Web Hosting site.
Change the password of an existing FTP user
To access the site on a Web Hosting to modify its FTP access:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on FTP / SSH in the left sidebar.
- Click on the action menu ⋮ to the right of the relevant user in the displayed table.
- Click on Edit:
- Enter the new password that will be used for your FTP or SSH access directly.
- If necessary, you can generate a strong password.
- Confirm the changes:
This guide explains how to delete an alias domain from an Infomaniak Web hosting. The main domain name of the site will then no longer be linked to any other domain name.
This notably allows you to create a new web hosting or distinct site for the domain name that has been unlinked.
Prerequisites
- Have dissociated the synonym domain from the main domain if there was an association previously.
Remove the alias domain
To remove an alias domain from your site:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the product in question:
- Then click on the chevron to expand the Domains section of this site.
- Click on the action menu ⋮ to the right of the domain to remove.
- Choose Unlink:
- Confirm the removal of the alias.
This guide explains how to format then mount the volume dedicated to storing your data on VPS Cloud Linux/Unix.
Disk and partition names
The VPS Cloud come 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 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 depending on various factors, such as the driver used (e.g. virtio-scsi or virtio-blk) or updates to the kernel and udev.
Therefore, it is recommended to use the UUID (Universal Unique Identifier - read more below) of a partition rather than its name when referencing it in the filesystem configuration file (/etc/fstab
).
Formatting the storage volume
If you choose XFS, for example, it is necessary 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 in /home
, you will no longer be able to connect to your server via your private key on the next reboot (because SSH looks for the keys in the .ssh
folder in the home directory of the user and if the data volume is mounted on this folder, the keys are lost). Therefore, it is necessary to copy the data to be preserved in advance. Help for SSH connection
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
Here's what happens in order:
- we create a temporary folder
- we mount the volume on the temporary folder
- copy the contents of the original folder
/home
to the root of the volume while preserving permissions, owner, group, etc. (note that you may need to install thersync
package depending on the chosen Linux distribution) - we unmount the volume from the temporary folder
- mount the volume on the
/home
folder - we delete the temporary folder
This way, you should be able to mount the volume on /home
while preserving the initial configuration that will be installed. However, it is recommended to always set a password for root
to avoid losing control in case of an error. The password can be removed later.
Alternative solution: do not mount in /home...
This is a standard location to mount the data volume as it is generally in /home
that users will work and especially store their data. A user without special rights will normally be limited to their /home/user
directory. It is possible to specify another default directory for a user (but the configuration will no longer be "standard").
Another alternative solution: automatic mounting of the volume at startup...
A mount does not survive a reboot. If you want to make the change persistent, you can add your volume to the file /etc/fstab
(Debian documentation on this topic) 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
.
Getting the UUID of a partition
To obtain the UUID of a partition after formatting it, use the blkid
command. This command displays the UUID along with other information about all partitions detected by your system.
Add 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.