Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how create a homepage on your Infomaniak website using the welcome page creation tool, a simplified help to create content quickly and easily.
Prerequisites
- Owning Infomaniak Web hosting (even a simple one) Starter, the basic web page to be activated if necessary).
Create a welcome page
To access the creation 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 Page and Maintenance in the left side menu.
- Check or select the domain name of the site on which you wish to install the web page.
- Click on Create a Home Page or Customize:
You can therefore choose a theme, set the text visible by your visitors, insert an image in the body of the page, manage the SEO content of your page, add an image in the background, specify social network user names if necessary, etc. and all this can be changed at any time.
Click on the blue button at the bottom of the page to save and publish your changes.
Note that the tool can be used in conjunction with a management by FTP your web hosting if necessary.
Disable and remove the welcome page
To erase the home page that was automatically placed at the root of the tree of your website:
- 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 Page and Maintenance in the left side menu.
You can delete the welcome page using the icon of Trash ; This will permanently delete the content of the welcome page!
This guide is for you if you encounter the error The web host does not exist
when visiting a site address on a Web Hosting Infomaniak.
Preamble
- This type of error usually occurs because your domain name is not properly linked to your site (your domain name is likely pointing to the wrong IP address or is misconfigured).
- Example: a domain
abc.xyz
that is misconfigured and points to a Starter hosting in IPv4, and to a shared hosting in IPv6…
- Example: a domain
Solving a Domain - Website Linking Issue
To get your site back online:
- Check the DNS zone of your domain name, especially its A records.
- Correct them if necessary by entering the IP address of your hosting.
- Any DNS addition or modification can take up to 48 hours to propagate.
For this, the easiest way is to use the DNS Diagnostic tool Infomaniak to automatically correct the pointing, by previously grouping the products in the same Organization if necessary.
This guide explains how to update an SSL Let's Encrypt certificate for a website hosted by Infomaniak.
Preamble
- It may be necessary as a result of the addition or deletion of aliases to a website regenerating a certificate to include new domain names related to the website.
- The dashboard will clearly indicate that one of the domains related to the site is not included in the SSL certificate in place:
Update a Let's Encrypt Certificate
To access certificate management:
- 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 the action menu ⋮.
- Click on Change Certificate:
- Choose the type of certificate to update.
- Click on the button Next:
- Check or select the relevant domains.
- Click on the button Install:
This guide explains how to report a attempted phishing (Phishing, Fishing, Filoutage...) Of which you would be a victim.
Preamble
- Phishing is an attempt at fraud and fraud, aimed at obtaining sensitive information fraudulently.
- Generally, the victim receives a message in his or her courier that appears to have come from Infomaniak, his or her bank or from a trusted body, telling him or her that a problem has occurred on his or her account or in his or her daily life:
- The purpose of this identity usurpation is generally that the user voluntarily visits a page and communicates private information that will then be exploited for various purposes, mainly financial.
Report an e-mail from Phishing
Prerequisites
- Verify that the spam filter is active.
- For more safety, activate the indication of external mail.
Next:
- Click here to access the web app Mail Infomaniak (online service) mail.infomaniak.com).
- Open the phishing message
- Click on the action menu ⋮ To the right.
- From the menu that appears, select
Report as phishing :
- Confirm the shipment for processing.
- Remove the e-mail
As soon as you clicked on Report as phishing, an e-mail is automatically sent to Infomaniak with all the information necessary for the processing of the report of the scam.
In case of a more serious problem (when the message is sent directly to you by a knowledge or contact without it being a large-scale shipment), it is recommended to intervene with an organization such as e.g. 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 function mysql_num_rows()
MySQL simply returns the number of rows of a result.
The disadvantage of this function is that it is very heavy for the server since it is a loop that runs 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()
who takes care of this and is much less burdensome. 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 just a few clicks on Cloud Server only.
Be aware of this other guide if you are looking for information about additional Web Applications that can be installed on any type of hosting including standard/mutualized offer.
Install (or uninstall) PHP Apps/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 nameassigned to the relevant Cloud Server.
- Click on PHP Extensions or on ‘ Fast Installer in the left side menu:
- Click on the action menu ⋮ to the right of the extension you want to uninstall in the array that appears.
- Click on Uninstall.
- Otherwise click the blue button Install an extension to make your choice of new installation:
Non-exhaustive list of apps & extensions available
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 free themeElegant Themes (Divi) on a WordPress site already installed via Infomaniak installer.
Prerequisites
- Your WordPress site must be installed via the tools Infomaniak WordPress to use these themes and extensions.
- The themes can be added during installation (stage 14 of the this other guide) or thereafter.
- In order to benefit from Elegant Themes support (customer service) you must subscribe to an offer from Elegant Themes.
Add a theme by Elegant Themes
To this end:
- Click here in order to access the management of your WordPress site on the Manager Infomaniak (Need help?).
- If your site does not appear here, it has not been installed via Infomaniak tools... Read the prerequisites above.
- Click directly on the nameallocated to the product concerned:
- Click on the action menu ⋮ located to the right of the relevant Web Application.
- Click on Parameters of the application:
- Click on Edit under Theme:
- Enable the desired theme.
- Click on the button Save:
Use an Elegant Themes extension
Be aware of 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.