Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to report a phishing attempt you may be a victim of.
Introduction
- Phishing is a fraudulent attempt to obtain sensitive information deceitfully.
- Generally, the victim receives an email that appears to come from Infomaniak, their bank, or a trusted organization, indicating that an issue has occurred with their account or in their daily life:
- The goal of this identity theft is generally to get the user to voluntarily go to a page and share private information that will then be exploited for various purposes, mainly financial.
Report a Phishing Email
Prerequisites
- Check that the spam filter is active.
- For added security, enable the external mail indicator.
Next:
- Click here to access the Infomaniak Mail web app (online service mail.infomaniak.com).
- 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
Once you have clicked on Report as phishing, an email is automatically sent to Infomaniak with all the information needed to process the scam report.
In case of a more serious issue (when the message is directly sent to you by an acquaintance or contact, and not as part of a mass mailing) it is recommended to contact an organization such as 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 mentionphp-7.0
,php-7.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.