Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to modify the server configuration of a website (.user.ini; .htaccess).
.htaccess or .user.ini File?
Apache is the HTTP server. It is configured with a .htaccess file placed at the root of the website.
PHP is a programming language used to create dynamic web pages via an HTTP server. You can customize PHP directives with a .user.ini file, which will be effective in the folders and subfolders of the location of the .user.ini file.
PHP directives must be placed in the .user.ini file to take effect!
Modifying the Server Configuration of a Website
via the Manager
To modify the PHP configuration, most settings (max_input_vars, allow_url_fopen, memory_limit, etc.) can be configured via the Manager:
- Open the Manager (manager.infomaniak.com)
- Go to Web Hosting
- If necessary, click on the hosting/domain name concerned
- Under Sites, at the bottom, click on the domain name of the relevant site
- Click on the Advanced Settings button
- Under the PHP and Apache tabs, adjust the site's configuration as needed
- Save
via the .user.ini File
For PHP directives that are not available in the Manager, you need to define the desired values in the .user.ini file.
For example:
max_file_uploads = 20
The list of existing directives can be found on the official PHP website, but items with "PHP_INI_SYSTEM" in the "Changeable" column, as well as max_input_time, memory_limit, and mysqli.default_socket, cannot be used.
via the Command Line Interface (CLI)
To customize PHP directives via a Command Line Interface (CLI) or in CRON tasks, you need to define the desired values in a .user.ini file and then call the PHP executable with the -c .user.ini option.
The following example changes the available memory for PHP:
~/web$ echo -e ' ' >memory-limit.php
~/web$ php memory-limit.php
memory_limit: 512M
~/web$ echo 'memory_limit = 1024M' >.user.ini
~/web$ php -c .user.ini memory-limit.php
memory_limit: 1024M
~/web$
The following example enables allow_url_fopen for the WP CLI tool (which allows retrieving extensions):
php -d allow_url_fopen=On ~/bin/wp package install trepmal/wp-revisions-cli
Learn More
- How to Create a .htaccess or .user.ini File
- Change the PHP Version of a Website
- Enable Gzip Compression
- Enable Google PageSpeed Tools
- Increase Script Memory and Execution Time
This guide explains how to add a site to existing hosting, by having a second domain name (domain2.xyz) or by adding the site as a subdomain (abc.domain.xyz)
During this multi-site/multi-domain management (virtual host), the disk space and resources of your hosting are shared between your sites/subdomains.
Add a site or subdomain
- open the Manager (manager.infomaniak.com)
- go to Web Hosting or Cloud Server depending on your product
- click on the hosting/domain name concerned
- under Sites click on Add
- choose between adding a Domain or a Subdomain
- enter the name of the Domain (ex: domain2.xyz) or Subdomain (ex: abc.domain.xyz)
- By default the new site is added in the following directory: /sites/domain2.xyz on your FTP server
- To manually define its location, you will need to click on Advanced Options (above the Validate button) and check the box: Define location manually and finally indicate a folder name
- Under Advanced Options , it is possible to choose a PHP version different from the one recommended
- complete the procedure with the Validate button
Manage/view your sites
- open the Manager (manager.infomaniak.com)
- go to Web Hosting or Cloud Server depending on your product
- in the Dashboard of the hosting concerned, your different sites are displayed under the heading: Sites
Thank you for letting us host your online projects.
This guide will enable you to quickly use the basic functions of your new product. In case of problems, please consult our knowledge base before contacting our support team.
You ordered a managed Cloud Server and you want...
- To create a WordPress website with "My Easy Site"
- To install a Web app (ownCloud, Joomla, Typo3, Drupal, phpBB, Simple Machines Forum, Magento, PrestaShop, etc.)
- Manage your FTP accounts/users
- Manage and publish files on your hosting via our FTP Manager
- Manage your MySQL databases
- Add a site or a subdomain to your hosting (multisite)
- Preview your site even if your domain name does not yet point to the Infomaniak servers
Important: If your domain name is not managed by Infomaniak or your hosting is not managed under the same customer account as your domain name, follow this guide to configure DNS or the Records to link the domain name to your hosting.
Thank you for entrusting us with the hosting of your online projects. This guide contains essential resources to get you started with your VPS Cloud, the unmanaged server offered by Infomaniak.
In case of problem, please consult our knowledge base. As a general rule, our support will only answer your questions that relate to the hardware part of the Cloud VPS.
Cloud VPS Information
- It is not planned to support UEFI and Secure boot in VPS Cloud offer
- It is not possible to migrate a vmdk file to work on OpenStack because we are using KVM for virtualization
- Concerning the opening of ports, consult this guide (click here)
Cloud Linux VPS
- How to connect to your server via an SSH key?
- Which Linux distributions are supported?
- Format and mount Cloud Server data volume (important)
Windows Cloud VPS
This guide concerns the Infomaniak WordPress & Apps tools that allow you to create and maintain a scalable and ergonomic website without requiring great technical knowledge, based on the most widely used content management system in the world, WordPress .
Install WordPress on the site of your choice
- open the Manager ( manager.infomaniak.com )
- go to Web Hosting
- click on the hosting/domain name concerned
- in the left side menu click on My Sites
- click on WordPress & Apps
- click on + New application
- choose WordPress and click Install
Two types of installation are available to you: easy and advanced to customize your use of WordPress a little more.
In any case, you will have to choose the site on which to install the application (via a drop-down menu showing the sites present within your hosting) as well as a user name (login) and a password which will be used to Log into the WordPress dashboard .
Uninstall a WordPress & Apps site
- open the Manager ( manager.infomaniak.com )
- go to Web Hosting
- click on the hosting/domain name concerned
- in the left side menu click on My Sites
- click on WordPress & Apps
- in the grid, hover over the WordPress you want to delete
- click on the trash can icon at the top right of the tile concerned
- confirm your wish to uninstall
Learn more
Run a command with root privileges
You have to type:
sudo -i
Effectively sudo -i loads root's full environment, giving you a full interactive session as root with root's home directory and environment variables. Learn more
under macOS or Linux
To connect, you need to open a Terminal window and enter the following command:
ssh -i [key path] [user]@[server]
If you receive a "WARNING: UNPROTECTED PRIVATE KEY FILE!" error, issue the following command:
chmod 400 [key path]
Meaning of indications
[ key path ] = link to the file that contains the private key. As a reminder, when ordering your VPS Cloud, you were asked to generate a key pair or to upload your own public key (the rights must be sufficient, 0700 for example).
[ user ] = read at the end of the guide
[ server ] = IPv4 address of the server (indicated on your administration console in the “Server” > “Cloud” menu on the “Cloud Server” page)
under Windows
Windows does not allow you to connect in SSH natively but you can activate the Bash shell (Windows 10 mininum) or download the following two free software: PuTTY & PuTTYgen
To begin with, your private key must be converted for use with PuTTY.
To do this, open PuTTYgen and click on the " Load " button to load your private key. Then just save your private key using the “ Save private key ” button.
Now open PuTTY and configure it with the following:
Under Session (in the left panel):
[ HostName ] = IPv4 address of the server (indicated on your administration console in the “Server” > “Cloud” menu on the “Cloud Server” page)
[ Port ] = leave the default port, i.e. 22
[ Connection type ] = indicate “SSH” here
Under Connection / SSH / Auth (in the left panel): open your private key generated via PuTTYgen using the “ Browse ” button under “ Private key file for authentication ”.
To finish, press the “Open” button at the bottom of the window. A terminal will open and ask for your username ([ user ] = read below)
Default username [user] of unmanaged cloud servers with:
Alma Linux = almalinux
archlinux= arch
CentOS= cloud-user
Debian Stretch = debian
Debian Jessie = debian
Debian Wheezy (and earlier) = root
Fedora = fedora
FreeBsd = freebsd
ubuntu= ubuntu
openbsd = openbsd
openSUSE LEAP 15 = opensuse
openSUSE 42 = root
rancherOs = rancher
SuSE linux Enterprise server = root
On a technical level
A hosting covers different websites. It is therefore possible to add several websites to a hosting (multisite management). In this case, the hosting resources (disk space, databases, runtimes and script memories, etc.) are shared between the different websites on the hosting.
For example, the basic Cloud Server plan contains 5 hostings and 20 websites. That means that you can create 20 website with 20 different domain/subdomain names which you can organise freely among your 5 hostings.
On an administrative level
You can assign rights at the level of a hosting. For example, you can assign the management of all sites contained on one hosting to one person.
However, it is impossible to restrict the management of certain sites within the same hosting.
A user (which you add on your management platform) cannot have a right limited to a single site, but only to a hosting.However, you cancreate an FTP user limited to a specific folder (in this case, you'd have to limit the user to the folder where the site is located).
This guide explains how to modify your current Managed Cloud Server offer.
Increase resources
The basic Managed Cloud Server plan contains 5 hostings and 20 websites.
To add additional hosting or change server configuration to increase CPU/RAM:
- open the Manager ( manager.infomaniak.com )
- go to Cloud Server
- click on the server concerned
- click on the Manage button then Modify the offer
- make the desired adjustments and complete the procedure
Read also modify the disk space of a hosting.
Increase process limit
On Linux, the number of processes a user or system can create simultaneously is limited. These limits prevent excessively fast processes from consuming excessive resources and affecting the general stability of the system. Process limits are managed by the Linux kernel and can be viewed and modified using specific commands and configuration files. You can request to increase the limits by contacting our support.
This guide explains how to enable or disable maintenance mode on a website in your hosting.
The maintenance mode allows you to display a personalized message to your visitors, for example during the resolution of a technical problem. It is also possible to configure IP addresses that can bypass this page.
Activate maintenance mode
To set up a page with the message of your choice:
- open the Manager (manager.infomaniak.com)
- go to Web Hosting
- click on the hosting/domain name concerned
- in the left side panel, click on My sites then on Pages editor
- choose the site concerned
- click on Create a maintenance page (or Customize )
- layout the text of your choice
- configure the display using the items on the right
- click on Save so as not to lose your modifications during editing
- click on Save & activate to publish the page
Allow IP addresses
It is possible to display a site even with the maintenance mode. To do this, it is necessary to enter the IP addresses of the computers that must be able to bypass maintenance mode:
- activate the maintenance mode according to the procedure above
- go to the configuration page of the maintenance page (see procedure above)
- under Maintenance on the right, click on Insert my IP address to authorize your computer to display the site without maintenance mode. It is also possible to manually enter the IPs to authorize
- click save and publish
Turn off maintenance mode
To disable the message that appears on your site during maintenance:
- open the Manager (manager.infomaniak.com)
- go to Web Hosting
- click on the hosting/domain name concerned
- in the left side panel, click on My sites then on Pages editor
- choose the site concerned
- in the Maintenance rectangle, click on Customize
- click on Save & deactivate at the bottom right
Alternative method for WordPress
It is not recommended to activate the Infomaniak maintenance page above to then work in WordPress. We recommend instead the use of a WordPress extension (there are dozens of them) dedicated to maintenance within the CMS itself or the addition of code
in a new empty file named .maintenance (the dot before the filename is important) placed on the server at the root of your site, which will disable all your pages except the WordPress homepage.This guide explains how to replace the main domain name associated with a Website in the event that you wish, for example, to change the name of your activity or change the spelling.
Indeed it is not possible to simply modify the spelling of the domain name concerned; you must own the new domain name and come install it instead of the current one by reversing it (read below).
Also note that you can rename your Web Hosting product in the Infomaniak Manager, but changing the name of a hosting has absolutely no impact on the site URLs. It is necessary to act on the domain name and if necessary adapt the content of the site.
Prerequisites
Have the desired new domain name (if necessary you have to buy it).
If the change sought is more of a "subdomain" to "main domain" type (example: dev.domain.abc → domain.abc) then a guide is here.
Add the new domain as an alias
When the new domain name is ready to be used instead of the old one:
- connect to your Infomaniak space (manager.infomaniak.com)
- add the new domain as an alias to your site
It is this alias that will replace the current main domain name after the inversion that you are going to perform.
Swap alias and primary domain
Once the alias domain is added to your site:
- connect to your Infomaniak space (manager.infomaniak.com)
- go to Web Hosting
- click on the relevant hosting/domain name
- under Sitesat the bottom right, click on the site concerned
- under Domains at the bottom right, click on the icon
all to the right of the alias intended to become the main domain
- chooseSet as primary domain
- if necessary, delete the old domain name and its variants that have become alias domains
If you use an SSL certificate, you will need to update it so that it includes the added aliases.
If you use the Dedicated IP option, you must uninstall it, and reinstall it after the reversal you are about to perform.
Adapt the content of the site
If your site corresponded to a specific domain name, it is possible that errors will appear if you do not adapt its content to the new name. Click below if you are using: