Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to move a Web Hosting (and all the sites it contains) from a Cloud Server to another managed Cloud Server.
If you wish to update the current Serveur Cloud to a next-generation server, refer to this other guide.
Preamble
- FTP & MySQL
- When moving a hosting from one Cloud Server to another:
- FTP access and databases do not change.
- Only the supported versions of PHP and MariaDB, as well as the server's IPv4 and IPv6 addresses, change for the hosting.
- Hostnames do not change and are automatically updated to point to the new IP addresses.
- When moving a hosting from one Cloud Server to another:
- Temporary interruption:
- The sites on the hosting will be unavailable during the migration of the data.
- This process can take several minutes depending on the number of files to be transferred to the new Cloud Server.
- Potential switch to HTTP/2:
- **HTTP/2 is active** on the new servers.
- Some directives that may be present in your server's .htaccess file might require adjustment.
- Traffic redirection:
- A proxy is set up for 7 days to redirect traffic from the old server to the new one.
- It is therefore advisable to consider this during this period, especially for the crons (see below).
- Cron jobs not migrated:
- The SSH crons are not migrated.
- Files and crons are generally not deleted immediately, which can result in duplicates.
- Managing crons is your responsibility; depending on the progress of your migration, you must:
- deactivate and activate crons via SSH if you have any, to avoid any execution conflicts,
- check your crons,
- ensure they are properly configured on your new Cloud Server.
Move the hosting
Prerequisites
- Both servers must be in the same Organization and accessible to the user performing the operation.
Once the second Cloud Server is operational:
- Click here to access the management of your Web Hosting on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on the Manage button.
- Click on Move to another server in the menu that appears:
- Select the desired destination server.
- Click on Validate.
Adjust the DNS zone and finish
If your domain names are not managed at Infomaniak or in the same Organization as the Cloud Server:
- Adjust the A record of the domains concerned.
- Any DNS addition/modification can take up to 48 hours to propagate.
- It is therefore recommended not to cancel the old Cloud Server before this deadline.
- Cancel the old Cloud Server if necessary.
This guide explains how to migrate from a VPS Lite to a VPS Cloud while keeping all your data and without having to reconfigure your installation.
It is not possible to cancel this change or go back. Switching from a VPS Cloud to a VPS Lite is not possible.
Perform a migration from VPS Lite to VPS Cloud
To begin the operation, access the VPS Lite:
- 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 Upgrade my offer:
- Click on the Upgrade button on the modal that appears.
- Complete the order to upgrade your VPS Lite.
- Wait during the migration, a service interruption will be felt during the process.
This guide explains how to display the IP address of a site on your Web Hosting.
Preamble
- The IPv4 address is generally the same for each site on the hosting (unless you have acquired a dedicated IP).
Display the IP address of your site
The IP address is specified on the hosting management page (Starter or containing multiple sites):
- 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.
- Then click on the chevron to expand the Information section of this hosting.
- The IPv4 address is displayed on the page:
- The IPv6 address is also displayed in the case of paid hosting:
This guide explains how to move an existing website within an Web Hosting Infomaniak to another Infomaniak Web Hosting.
Preamble
- There are not many turnkey solutions for moving a website.
- Generally, few hosts offer the export or import of a complete site with its databases; this is largely due to the fact that there are many ways to build a site and just as many languages that are largely incompatible with each other.
- If the site to be transferred is built with WordPress, refer to this other guide illustrating a simplified solution.
- It is also possible to move a complete Web Hosting (read below).
- Make your life easier! If needed, **local partners recommended by Infomaniak can handle these procedures**. Launch a **free tender**. They take care of everything, freeing you from the technical details.
Manual solution: example of site transfer
To do this manually, it is necessary to:
- retrieve the web data as well as the associated databases,
- re-publish this on a site created on the destination web hosting,
- and if the associated domain name is the same, the first site will need to be deleted or renamed.
For the rest, here is an example of how to proceed:
- Order the other Web Hosting / Cloud Server if you haven't already.
- Create a «fake site» on this new hosting (for example dev.domain.xyz - read more below).
- Manually copy your data via FTP and MySQL (export / import).
- Adjust your site if necessary (database address, etc.).
- Once you are satisfied with the «new site», delete the old one.
- Change the name of the new site to give it its true name.
An alternative, at point 2 above, is to work with the alias www.
which you can detach beforehand from your current site. Indeed, the alias www(.domain.xyz) is often installed as an alias for your site, and it is enough to detach it, which allows the creation of a site on the other hosting with the name www.domain.xyz (do not forget, at point 6, to add your alias of type "domain.xyz" without the www to this new site).
Moving entire Web Hostings
There is an automated way to move a Infomaniak Web Hosting to:
- an Infomaniak Cloud Server (if the hosting is currently shared or if the hosting is already on Cloud Server)
- another Infomaniak Organization
A Starter hosting cannot be moved but it can be converted.
This guide details the use of Perl or Python scripts on Web Hosting Infomaniak.
Preamble
- Perl and Python scripts are often used with Apache's CGID module to generate dynamic content on web servers.
- This module allows Apache to process requests using scripts written in Perl or Python via the CGI (Common Gateway Interface) protocol, thus offering the possibility to create interactive and responsive web pages based on user interactions with the site.
- However, for security reasons, **Infomaniak has chosen to disable the ability to run scripts written in Perl or Python via this specific module (CGID) of Apache on its shared hosting offers.**
- Therefore, you should consider **changing your plan** to a Cloud Server plan if you are currently on a shared web hosting plan.
Using scripts
Here is some practical information:
- The path to the Python interpreter is
/usr/bin/python
. mod_python
is not supported.- Running scripts without the
pl
orcgi
extension is not possible. However, a file with a.pl
extension can exist and be called via a URL without the extension.
If you receive the following error message:
CGIWrap Error: Execution of this script not permitted
Execution of that script is not permitted for the following reason:
(1) Script file not found.
Request Data:Extra Path Info: /dossier/wwwdata/collection/vignettes/blabla.PL.12.34.56.gif
While the uploaded file is a simple GIF image with a filename type "blabla.PL.12.34.56.gif
", this is due to the name of the files in question. To bypass the issue, simply rename your files.
This document explains how to manage incoming and outgoing connections between several hosting environments, particularly for accessing databases.
Connecting to databases between hostings
From a shared hosting environment
If you are using a shared hosting (excluding the old v1 - 60 Go formula), you have the possibility to access databases located on:
- another shared hosting environment,
- a hosting based on a Cloud Server.
It is therefore possible to share a database, establish a remote connection, or even configure cross-access between hostings.
From a Cloud Server
With a Cloud Server, it is also possible to connect to databases hosted on another Cloud Server.
- In this case, make sure that port
3306
(TCP protocol) is open for incoming traffic in the firewall.
Note: Connections to databases hosted on a shared hosting are not possible from a Cloud Server.
From another hosting provider
To learn about the terms of access to MySQL databases from a provider external to Infomaniak, refer to this other guide.
This guide explains how to display the absolute paths for certain web applications that need to know them.
Getting the absolute path…
… of a web hosting
For 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 the chevron to expand the Information section of this hosting.
- The highlighted indication below is the location of the example site:
… of a website
For 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 the chevron to expand the Information section of this site.
- The highlighted indication below is the location of the example site:
This guide shows how to modify the error_reporting()
directive on your website.
Enable error reporting
Specify the following 2 pieces of information in your .user.ini
file:
display_errors=on
error_reporting=E_ALL & ~E_NOTICE & ~E_STRICT
If your browser does not display any errors or warnings, then there are none.
Disable PHP error display
For WordPress, edit the file wp-config.php
and replace the line:
define('WP_DEBUG', false);
by:
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
Otherwise, you can add the following code to the .user.ini
file:
display_errors=off
This guide concerns IonCube Loader, a PHP module that allows decoding PHP scripts that have been encoded with IonCube Encoder.
Preamble
- IonCube encoding is used to protect an application's source code and prevent its unauthorized modification or distribution.
- By using IonCube Loader, website owners can ensure the security of their code and content while allowing for secure and easy distribution of their applications.
Using ionCube Loader
With shared hosting it is no longer offered. You can check this from the dashboard:
- 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 Manage under Advanced Settings:
- Click on the PHP Extensions tab.
- Click on ionCube Loader (if present in the list) to see the details:
- Here you should consider a Cloud Server.
This guide concerns the configuration and management of ModSecurity on Infomaniak servers. By understanding its limitations, restrictions, and effectively managing errors, you can optimize the security of your site while maintaining its functionality.
Default configuration
ModSecurity (mod_secure) is available and enabled by default on the Infomaniak servers. This means that all HTTP requests will be subject to the security rules defined by ModSecurity.
It is not possible to disable ModSecurity on Infomaniak servers. The setting is global to the server where your site is hosted, which means that all defined security rules will be applied to your site.
Error management
If the error message ModSecurity: Access denied with code 403 (phase 2). Operator EQ matched 0 at REQUEST_HEADERS. (...)
appears regarding ModSecurity, you should check that a default language is properly configured in your web browser. This error can sometimes be caused by incorrectly configured language settings in the browser.
This guide details the "X-Frame-Options" header, which can be used to protect against clickjacking attacks. Note that the "X-Frame-Options" header may not be supported by all web browsers. It is therefore recommended to combine it with other methods to enhance the security of your website.
Possible values for the header
The "X-Frame-Options" header can be set to prevent a website from being loaded in a frame or iframe. There are three possible values for this header:
- "DENY": the website cannot be loaded in a frame or iframe
- "SAMEORIGIN": the website can be loaded in a frame or iframe only if the source of the frame or iframe belongs to the same domain as the website
- "ALLOW-FROM uri": the website can be loaded in a frame or iframe only from the specified URI
You can set this header by adding the following lines to your .htaccess file:
Header set X-Frame-Options "DENY"
or by using the header() function in PHP, as it is executed in FPM, in the same way as when disabling HSTS, for example:
header('X-Frame-Options: DENY');
Replace "DENY" with the desired value for this header.
This guide provides information about the robots.txt
file automatically created for Web hosting where this file is missing.
Preamble
- The
robots.txt
file acts as a guide for search engine crawlers - It is placed at the root of a website and contains specific instructions for these robots, indicating which directories or pages they are allowed to explore and which they should ignore
- However, robots may choose to ignore these directives, making the
robots.txt
a voluntary guide rather than a strict rule
File Content
If the robots.txt
file is missing from an Infomaniak site, a file with the same name is automatically generated with the following directives:
User-agent: *
Crawl-delay: 10
These directives tell robots to space out their requests by 10 seconds, which helps to avoid unnecessarily overloading the servers.
Bypassing the default robots.txt
It is possible to bypass the robots.txt by following these steps:
- Create an empty
robots.txt
file (it will serve only as a placeholder so that the rules do not apply). - Manage the redirection of the URI (Uniform Resource Identifier)
robots.txt
to your chosen file using a.htaccess
file.
Example
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} /robots.txt$
RewriteRule ^robots\.txt$ index.php [QSA,L]
</IfModule>
Explanations
- The
mod_rewrite
module of Apache is enabled to allow redirections. - The condition
RewriteCond %{REQUEST_URI} /robots.txt$
checks if the request concerns therobots.txt
file. - The rule
RewriteRule ^robots\.txt$ index.php [QSA,L]
redirects all requests torobots.txt
toindex.php
, with the option[QSA]
that preserves the query parameters.
It is recommended to place these instructions at the beginning of the .htaccess
file.
This guide details the use of DELIMITER
to create MySQL functions on Serveur Cloud Infomaniak.
Preamble
- When creating functions or stored procedures in MySQL, it is crucial to understand the role of delimiters.
- The correct use of delimiters is essential to avoid syntax errors that can occur due to the presence of multiple SQL statements in a single function or procedure definition.
Understanding the Delimiter
A delimiter is a character or sequence of characters used to separate SQL instructions in a script. By default, MySQL uses the semicolon (;
) as a delimiter. However, when creating functions, stored procedures, or triggers that contain multiple SQL instructions, it is necessary to temporarily change the delimiter to avoid syntax errors.
When you create a function, procedure, or trigger, you often need to use multiple SQL statements within the BEGIN...END
block. Since the semicolon (;
) is also used to terminate these internal statements, MySQL might interpret the first semicolon as the end of the function definition, resulting in a syntax error. To avoid this issue, you must change the delimiter during the function definition.
Create a simple function using custom delimiters
Before defining the function, you must tell MySQL that you will use a different delimiter. In the example below, $$
is used as the new delimiter:
DELIMITER $$
With the new delimiter in place, you can now define your function. The CREATE FUNCTION
includes the body of the function, where you can use internal SQL statements separated by semicolons without any issues:
CREATE FUNCTION hello_world()
RETURNS TEXT
LANGUAGE SQL
BEGIN
RETURN 'Hello World';
END;
$$
In this example:
CREATE FUNCTION hello_world()
: declares the beginning of the definition of the functionhello_world
.RETURNS TEXT
: specifies the data type that the function returns.LANGUAGE SQL
: specifies that the language used for the function is SQL.BEGIN ... END
: encapsulates the function code. Inside, the semicolon is used to separate SQL statements.RETURN 'Hello World';
: SQL statement that returns the stringHello World
.
After defining the function, reset the delimiter to its default state (the semicolon). This allows you to continue executing the usual SQL instructions in your subsequent scripts:
DELIMITER ;
This guide explains how to securely and easily transfer files between Web Hosting and/or Cloud Server.
Preamble
- The FXP (File Exchange Protocolis a method for transferring files directly between two FTP servers without the data passing through the local client.
- Using the FTP PORT and PASV commands, it allows for a connection to be established between the two servers for faster and more efficient file transfer, thus saving bandwidth.
- However, this method may present security risks if the connections are not secured by FTPS, and it requires a more complex configuration compared to traditional FTP transfers.
Transferring data between servers
FXP is enabled by default on Serveurs Cloud and hébergements Web (excluding Starter).
For example, you can use CrossFTP, a multi-platform software that allows you to perform FXP (as well as FTP, SFTP, WebDav, S3, OpenStack Swift).
This guide explains how to initialize your VPS Cloud / VPS Lite with Windows upon first connection.
Initializing a Cloud Server with Windows
You must change your Windows user password before you can connect via RDP (Remote Desktop Protocol) to your server, otherwise an error is returned (indicating that the password must be changed).
To do this, you must connect using the VNC console the very first time.
Once the user password has been changed (via VNC), it will be possible to connect without any issues via RDP. This protocol is already activated on the Infomaniak Windows images.
Login credentials
- Username:
- for Windows 11 Professional =
Infomaniak
- for Windows 10 Professional =
Infomaniak
- for Windows Server =
Administrator
- for Windows 11 Professional =
- Password: the one you chose when ordering the server; if forgotten, please reset the server.
- IP Address: the one indicated on your server's dashboard.
Connect via RDP…
- … on Windows: Remote Desktop is a built-in feature.
- … on macOS: install the free desktop app Windows App (formerly Microsoft Remote Desktop).
- … on Linux: install the app Remmina.
This guide explains how to change the WordPress management password or any other Web application (Joomla, Drupal, Typo3, PrestaShop, ownCloud, etc.) installed via Infomaniak tools included in the offersWeb hosting paid.
Preamble
- Some applications also allow a change of user password directly from their dedicated interface:
- Example: WordPress (manage users, names, passwords, roles, etc.).
Change the password of a Web app
To change the password to the administration panel of your web application, perform the following actions:
- 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 ⋮ located to the right of the relevant Web Application.
- Click on Parameters of the application:
- Click on Edit to the right of the Application:
- Under Password Enter the new password (for connection to the identifier indicated above):
- Click on the button Save at the bottom of the page.
This guide explains how to enable the following functions on Web Hosting (in italics, Cloud Server only):
proc_open
popen
exec()
shell_exec()
set_time_limit
passthru
system
These functions are disabled by default as they pose a significant security risk in case of a website hack. Only enable them if absolutely necessary (for a script or CMS such as ImageMagick, Typo3, CraftCMS, etc.).
Enable PHP functions
To access website management:
- 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 Manage under Advanced Settings:
- Click on the PHP / Apache tab.
- Click on the toggle switches On/Off as desired:
- Click on the Save button to confirm the changes.
This guide explains why there is a folder /icons/
within the Web Hosting.
/icons/ folder on your Web Hosting
In some cases, a folder named /icons/
is present by default on your web hosting. This folder is generally accessible via HTTP, but is not visible in the FTP directory structure (www.domain.xyz/icons/
).
This directory /icons/
is often used to store specific icons or images used to display directory lists. These icons are generally used by web servers to visually represent the different types of files in directories when they are viewed through a browser.
This guide provides precise information on the support for the ASP
(Active Server Pages, aspx) development environment within the Infomaniak infrastructure.
ASP support
The Web hosting and Cloud Servers services are based on an Apache server architecture that does not natively support the Apache::ASP module.
However, it is possible to install and configure this ASP environment on VPS Cloud Infomaniak.
This guide explains how to access the VNC console with VPS Cloud / VPS Lite Infomaniak.
Preamble
- Initial access to the server is via SSH key; it is therefore necessary to assign a password to the
root
account or create another user before you can authenticate with the VNC console. - Attention: you must use a US keyboard layout to use VNC properly!
Open the VNC console
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 Open the VNC console under Quick Actions.
If there is a display issue with the console, then from the VM:
In /etc/default/grub
modify GRUB_CMDLINE_LINUX_DEFAULT
, GRUB_GFXMODE
and GRUB_GFXPAYLOAD_LINUX
(the latter variable is likely missing and needs to be added):
GRUB_CMDLINE_LINUX_DEFAULT="biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200
earlyprintk=ttyS0,115200 consoleblank=0 systemd.show_status=true video=VGA-1:1280x1024"
GRUB_GFXMODE=1280x1024x16
GRUB_GFXPAYLOAD_LINUX=keep
Then update grub and reboot:
grub-mkconfig -o /boot/grub/grub.cfg
The resolution can be changed (1000x400 instead of 1280x1024 for example) to display the VNC console in the administration interface without opening a new tab.