Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to report a phishing attempt (Phishing, Fishing, Filoutage...) of which you may be a victim.
Preamble
- Phishing is an attempt at fraud and scam, aiming to obtain sensitive information fraudulently.
- Generally, the victim receives in their inbox a message appearing to come from Infomaniak, their bank, or a trusted organization, indicating that a problem has occurred on their account or in their daily life:
- The goal of this identity theft is generally for the user to voluntarily go to a page and communicate private information that will then be exploited for various purposes, mainly financial.
If you find an email of this type in your inbox, you have the possibility to act (see below) so that these messages decrease and eventually disappear from the messaging systems.
Report a Phishing Email
Prerequisites
- Check that the spam filter is active.
- For added security, enable the mention of external mail.
Then:
- Click here to access the Infomaniak Mail Web App (online service ksuite.infomaniak.com/mail).
- Open the phishing message
- Click on the action menu ⋮ on the right.
- From the menu that appears, select
Report as phishing :
- Confirm sending for processing.
- Delete the email
As soon as you click on Report as phishing, an email is automatically sent to Infomaniak with all the information necessary to process the scam report.
In case of a more serious problem (when the message is sent directly to you by an acquaintance or contact without it being a mass mailing) it is recommended to contact an organization such as for example www.report.ncsc.admin.ch.
This guide explains how to change the PHP version directly from the command line when you run PHP scripts using PHP CLI (Command Line Interface) on an Web Hosting Infomaniak.
Preamble
- This can be useful when you need to temporarily modify certain parameters for a specific script or for a PHP session.
- If you use only the mention
php
below, it is the release preceding the one already in place that will be installed (last version -1): if the last installed version is 8.1, it is 8.0 that will be used with "php
". It is preferable to use the mentionphp7.0
,php7.1
, etc. so that the version does not change over time with updates. - Refer to this other guide if you are looking for information about configuring the PHP version set on the Infomaniak Manager.
Change the PHP version used in CLI
It is possible to easily modify the PHP version used in the command line (CLI) via SSH:
- Log in to the server via SSH (need help?).
Create a
.profile
file if it does not exist:touch ~/.profile
Edit the
.profile
file:nano ~/.profile
Add this code inside the file to select the desired PHP version:
export PATH=/opt/php7.4/bin:$PATH
Load the
.profile
file:source ~/.profile
Check the PHP version:
php -v
Interactive mode
The .profile
file mentioned above is only loaded when the user interface is used. In SSH (login mode), it is the .bash_profile
file that is sourced. And in interactive mode (non-login), it is the .bashrc
file that is sourced.
Some server deployment scripts open sessions in interactive (non-login) mode and the environment variables are not loaded into the PATH even if the SSH session is correctly configured.
In this case, you need to load the php version in the .bashrc
file (export PATH="/opt/php7.4/bin:$PATH"
), and source the .bashrc
file in the .bash_profile
and .profile
files (. ~/.bashrc
).
After following these steps, the version of PHP you specified should be loaded into your shell environment every time you open a new session. This will allow you to run scripts using this version of PHP from the command line (CLI).
This guide explains why it is recommended to abandon the MySQL function mysql_num_rows()
which simply returns the number of lines in a result.
The disadvantage of this function is that it is very heavy for the server since it is a loop that goes through each line to count them.
For example:
$SQLstr = "SELECT * FROM commentaires WHERE affiche=1";
$r = mysql_query($SQLstr);
$num = mysql_num_rows($r);
MySQL has a function count()
that handles this and is much less resource-intensive. Use this:
$SQLstr = "SELECT count(*) FROM commentaires WHERE affiche=1"
$r = mysql_query($SQLstr);
$result = mysql_fetch_row($r);
$num = $result[0];
or
$SQLstr = "SELECT count(*) as total FROM commentaires WHERE affiche=1"
$r = mysql_query($SQLstr);
$result = mysql_fetch_array($r);
$num = $result['total'];
This guide explains how to install applications, PHP extensions and technologies (non-exhaustive list below) in a few clicks on Serveur Cloud only.
Refer to this other guide if you are looking for information about additional Web Applications that can be installed on any type of hosting, including standard/shared offers.
Install (or uninstall) apps / PHP extensions…
To find the list of technologies and proceed with their installation:
- Click here to access the management of your Cloud Server on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant Cloud Server.
- Click on PHP Extensions or on ‘Fast Installer’ in the left sidebar:
- Click on the action menu ⋮ to the right of the extension you wish to uninstall in the displayed table.
- Click on Uninstall.
- Otherwise, click on the blue button Install an extension to make your choice for a new installation:
Non-exhaustive list of available apps & extensions
AdvanceCOMP
BuildEssential
electron_dev
ExifTool
FFmpeg
↗ guideGhostscript
Gifsicle
GraphicsMagick
HAProxy
Imagemagick
↗ guideJpegoptim
libjpeg_turbo
libqrencode
libX11_xcb1
MidnightCommander
Memcached
↗ guidemongoDB
NVM Node Version Manager
OptiPNG
p7zip
PDFtk
PHP_APCu
PHP_CLI
↗ guidePHP_FPM
PHP_GnuPG
PHP_gRPC
PHP_igbinary
PHP_IonCube
↗ guidePHP_OPcache
PHP_PDF
PHP_PDO_ODBC
↗ guidePHP_Swoole
pip
Pngcrush
Pngquant
Redis
↗ guideRRDTool The Round Robin Database Tool
RubyCompass
systemd
↗ guidetesseract_ocr
varnish
↗ guidevirtualenv
WebP
xauth
xpdf
xvfb
ZSH
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 add a theme from Elegant Themes (Divi) for free to a WordPress site already installed via the Infomaniak installer.
Prerequisites
- Your WordPress site must be installed via the Infomaniak WordPress tools to use these themes and extensions.
- Themes can be added during installation (step 14 of this other guide) or afterward.
- To benefit from Elegant Themes support (customer service) you must subscribe to an Elegant Themes offer.
Add an Elegant Themes theme
To do this:
- Click here to access the management of your WordPress site on the Infomaniak Manager (need help?).
- If your site does not appear here, it means it was not installed via the Infomaniak tools… Refer to the prerequisites above.
- Click directly on the name assigned to the relevant product:
- Click on the action menu ⋮ located to the right of the relevant Web Application.
- Click on Settings for the application:
- Click on Edit under Theme:
- Activate the desired theme.
- Click on the Save button:
Using an Elegant Themes extension
Refer to this other guide to install Monarch, Bloom.
This guide explains the directive "Options +Indexes
" for Web Hosting, which facilitates navigation for visitors and allows for more advanced customization of how files are displayed.
Introduction
- One of the main advantages of enabling directory indexing is that visitors can view and list all files and subdirectories of a given directory, even if they do not know the exact name of the file they are looking for. This can be particularly useful for file-sharing websites or download sites.
- Directory indexing also makes navigation easier for visitors who are not familiar with the site's file structure. They can simply browse through the subdirectories to find the file or folder they need.
- The directive "
Options +Indexes
" can be customized to display additional information, such as the size and modification date of files, or to hide specific files or directories. - Without this directive, a visitor may encounter an error of the type:
Accès interdit!
Vous n'avez pas le droit d'accéder au répertoire demandé.
Soit il n'y a pas de document index soit le répertoire est protégé.
Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 403
List the contents of a Web folder
To list the contents of a folder without a specific index:
- Create a .htaccess file in the relevant folder.
- Enter the following command:
Options +Indexes
Note that this solution will only work if you have no index in the directory in question; you must remove the files index.php
, index.html
, index.htm
, etc. but also the possible file welcome.php
…
Customize the display
Here is an example of code to customize the appearance of the file list generated by Apache:
Options +Indexes
IndexOptions FancyIndexing
IndexOptions FoldersFirst IgnoreCase NameWidth=* DescriptionWidth=* Charset=UTF-8
HeaderName header.html
ReadmeName footer.html
In this example, the user enables the "Indexes
" option, adds the "FancyIndexing
" option for a more aesthetic appearance, specifies the sorting order of the files, defines the column width for the name and description of the files, and specifies the file names to use for the header and footer of the file list.
This guide explains how to connect to your Web Hosting using an SSH key.
Prerequisites
- Create a FTP + SSH account from the Infomaniak Manager.
- Create an SSH key with a secure algorithm, for example
ed25519
:ssh-keygen -t ed25519
because with an rsa key (
ssh-keygen
orssh-keygen -t rsa
), the connection will be refused and the following error will be returned in verbose mode:debug1: send_pubkey_test: no mutual signature algorithm
Upload the SSH key
For this:
- Log in to the server via SSH (need help?).
Go to the root of your hosting:
cd ~
Create the «
.ssh
» directory:mkdir .ssh
- Change the permissions of the
.ssh
directory to chmod 700. - Create the file
authorized_keys
and paste your public SSH key into it on a single line (important). - Change the permissions of the
authorized_keys
file to chmod 600.
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 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 Laravel, an open-source web framework written in PHP following the model-view-controller (MVC) principle. Also refer to their documentation.
For additional help, contact a partner or launch a free tender — also discover the role of the host.
Prerequisites
- Have a Shared Web Hosting or Cloud Server with the latest MySQL/MariaDB.
- Site running PHP 8.2.
- Create an SSH access.
- Create a database.
Installation of Laravel 11
For this:
- Log in to the server via SSH (need help?).
- Navigate to the site directory by running the command “cd chemin-vers-le-site” (for example
cd sites/laravel.domain.xyz
). - Create a new project by running the command
composer create-project laravel/laravel example-app
. - Modify the
.env
file at the root of the hosting to update the connection parameters for the new database:- DB_CONNECTION=mysql
- DB_HOST=xxxx.myd.infomaniak.com
- DB_PORT=3306
- DB_DATABASE= the name of the MySQL database (xxxx_newbdd)
- DB_USERNAME= the MySQL user with rights to this database
- DB_PASSWORD= its password
- Navigate to the project directory and publish via SSH:
cd example-app
php artisan migrate
- Modify the target directory to point to the "public" subdirectory of the project, here
/sites/laravel.domain.xyz/example-app/public
.
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 explains how to add an alias domain to a domain name.
Introduction
- A synonym domain is a domain name that can serve as a secondary name for another domain.
- When a synonym domain is added, it automatically inherits the content of the DNS zone of the main domain (including
MX
,A
records, etc.), as well as its Web and Mail hosting. - Alternatively, you can also add a (domain) alias to a website or add a (domain) alias to a Mail Service.
Add a synonym domain to a domain
Prerequisites
- The domain name of the future synonym or the management of its DNS zone…
- … must be reserved with Infomaniak,
- … must be configured with the Infomaniak DNS,
- … must not yet be linked to any product.
- The domain name to which the synonym will be added…
- … must not be associated with the Infomaniak Newsletter product.
To access your domain names:
- 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 Synonym domains in the left sidebar.
- Choose to add a synonym.
- Click on Next:
- Select an existing domain within the current Organization, or order a new domain in advance, and click the button to Confirm:
Refer to this other guide if you are looking for information on how to dissociate a synonym domain name.
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 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 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 protect part of a site on a Web Hosting by making it mandatory to enter a password before viewing a directory (including subdirectories) from a browser.
Simple method
Password-protect (Digest authentication) a directory using the "Folder Protection" tool:
- 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.
- Click on Security in the left sidebar.
- Click on Folder Protection in the left sidebar.
- Click on the directory to protect.
- Enable protection with the toggle switch and then create one or more users*:
- * Users are defined per directory; the tool does not allow managing user groups:
- * Users are defined per directory; the tool does not allow managing user groups:
- Click on the Add button.
- Click on the button to add access for an additional user if necessary.
- Click on the action menu ⋮ located to the right of the user in question to modify or remove them.
- Click the toggle switch again to completely disable the folder protection:
Manual method via .htaccess
To protect a folder with a password using your site's .htaccess
file:
- Log in to your hosting via an FTP software/client or the FTP Manager.
In the folder to protect, create a file called
password.php
and adapt the following content inside by replacing12345
with the desired password:<?php $pass = "12345"; echo password_hash($pass, PASSWORD_DEFAULT); // Affiche le mot de passe chiffré ?>
- Open a web browser and display the file
password.php
(example: domain.xyz/dossier-à-protéger/password.php). - The web browser displays your encrypted password; copy the encrypted password, it will be needed later…
In the folder to protect, create a file called .htaccess
and adapt the following content inside:
AuthName "Page d'administration protégée"
AuthType Basic
AuthUserFile "/exemple/.htpasswd"
Require valid-user
Replace /exemple/
with the absolute path of the folder to protect. Example:
AuthUserFile "/home/clients/0f83c7afb710e5ae2645a1b704d8772f/web/dossier_a_proteger/.htpasswd"
In the folder to protect, create a file called htpasswd.txt
and adapt the following content inside:
login:password_chiffré
- Replace
login
with the desired login. - Replace
password_chiffré
with the encrypted password copied in step 1 of this guide.
Once the file htpasswd.txt
is saved, rename it as follows: .htpasswd
.
Open a web browser and try to display one of the pages contained in the protected folder. If the guide has been followed correctly, the chosen login and password (unencrypted) allow access to the protected folder.
Other restrictions can also be added by .htaccess
.
This guide details how, when activating a new WordPress theme, the formatting and content of articles and pages can be altered, this if the new theme does not use the same shortcodes and/or the same page builder (page constructor).
Layout issues
Here is an example of how your articles and pages may appear after changing your WordPress theme:
Unfortunately, there is no automatic solution to fix this issue: you will have to:
- either revert to the old theme you were using
- or manually adapt the content of your site with the tools provided by your new WordPress theme.
Obviously, you can also uninstall and reinstall WordPress, the site content will be erased and you will start fresh.
Avoiding future issues
Here are some tips to avoid having to reformat all the content of your site in case of a theme change:
- Use WordPress theme-specific shortcodes as little as possible.
- Use a universal page builder that is compatible with all WordPress themes (for example Visual Composer or Thrive Content Builder).
- Take the time to test and evaluate the quality of a theme by comparing it with 2-3 similar themes before using it and adapting all the content of your site.
Useful resources
- Find and automatically remove all unused shortcodes (article in English)…
This guide explains how to view a website hosted by Infomaniak even if no domain name/URL is currently correctly configured to direct the visitor to this site.
Introduction
- With the preview URL of your website, you can view the current version of your content in a browser, regardless of whether the corresponding future domain name is not yet configured correctly.
- This site preview can be done using a preview URL and notably allows you to test a site before pointing a domain name that, for example, currently points elsewhere.
- This temporary URL provided by Infomaniak may change at any time and is only available with paid offers.
Get the preview URL for your site
To do this:
- 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 More information.
- The preview address is indicated under Preview URL (ex.:
XXX.preview.infomaniak.website
):
In case of trouble…
If, when visiting your preview address, the URL immediately changes to another, this may be due to a .htaccess
file that you have modified to include rewrite rules. You need to disable it and then test again.
... on WordPress
If the **preview URL** keeps displaying even though you have already configured the domain name, you need to assign the final address as the main address in your website options.
Alternatives to preview your site
If you wish to proceed differently than with the preview address provided by Infomaniak (see above), you can modify the hosts
file of your computer (including with browser extensions like this one for Firefox). You will need the IP address of your site for this.
When your tests are finished or the DNS records for the domain name are up to date, do not forget to delete any changes you have made, otherwise it will be impossible to display your site if the server's IP address is changed or if the site is migrated to another web hosting service.