Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide concerns inbound and outbound traffic permissions between different hosts at the database level.
Access...
... to databases external to Infomaniak
From a Infomaniak Web hosting, it is possible to make MySQL queries to external servers without restriction.
... from the outside to the Infomaniak databases
Access to Infomaniak databases from outside the infrastructure is only allowed with a Serveur Cloud (you need to open port 3306
in TCP / inbound in the firewall).
Regarding access to MySQL databases from another Infomaniak Web hosting refer to this other guide.
Allow external connections on MongoDB
Regarding MongoDB, you need to disable the local_only
option from Fast Installer:
- 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 Fast Installer in the left sidebar.
- Click on
MongoDB
. - Click on the action menu ⋮ to the right of the relevant item in the displayed table.
- Click on Configure:
- Disable
local_only
: - Save the changes.
The port 27017
for MongoDB
must be opened in the firewall.
This guide explains how to activate or deactivate maintenance mode on a website of an Hosting Infomaniak.
Introduction
- Maintenance mode allows you to display a custom message to your visitors, for example while resolving a technical issue.
- It is also possible to specify IP addresses that can bypass this page.
- An email is sent to the users of the Organization.
Enable maintenance mode
To activate a page that temporarily replaces your usual homepage:
- 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 the toggle switch to enable the maintenance page:
- Confirm the activation of maintenance mode.
Customize the maintenance page
To set up a page with your chosen message:
- 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 Maintenance Page in the left sidebar.
- Click on Create a page or on the Customize button if it already exists:
- Format the text of your choice.
- Configure the display using the elements on the right.
- Click on Save to avoid losing your ongoing edits.
- Click on Save & Activate to publish the page:
Allow IP addresses
It is possible to display a site even with maintenance mode enabled. To do this, it is necessary to enter the IP addresses of the computers that need to bypass maintenance mode:
- Activate maintenance mode according to the procedure above.
- Go to the maintenance page configuration page (see procedure above)
- Under Maintenance on the right, click on Insert my IP address to allow your computer to display the site without maintenance mode.
- It is also possible to manually enter the IP addresses to authorize.
- Click on Save and publish.
Disable maintenance mode
To disable the message that appears on your site during maintenance:
- 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 either the Disable button or the toggle switch to disable the maintenance page:
- Confirm the deactivation of maintenance.
Alternative method for WordPress
It is not recommended to activate the Infomaniak maintenance page above to then work in WordPress.
It is recommended to install a WordPress extension (there are dozens available) dedicated to maintenance within the CMS itself.
Alternatively, you can add the code <?php $upgrading = time(); ?>
to a new empty file named .maintenance
(the dot before the file name 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 create subdomains on an existing Infomaniak hosting, using a .htaccess
file.
Preamble
- The hosting can be on a Shared Web Hosting offer or on a Cloud Server but this function is impossible with a Starter hosting.
- Subdomains can be added very easily to your current hosting since you have 20 sites per hosting (sites = subdomains) included in the base offer.
- If you do not wish to use this available site volume, you can follow the method below.
Create a subdomain as a shortcut
The subdomains created in this way help to organize a hosting. For example, the address vlog.domain.xyz
will be a shortcut for the address domain.xyz/vlog
. In other words, the address vlog.domain.xyz
will redirect to the folder vlog
which must be located at the root of the website domain.xyz
. In this example, vlog
is the subdomain of domain.xyz
.
1. Add the subdomain as an alias for your website
To do this:
- Follow the alias addition procedure but please read points 2 and 3 below.
- In the field to add the linked domain, enter the full address of the subdomain (e.g.
vlog.domain.xyz
). - If your domain or its DNS zone is managed by Infomaniak, enable the following two options: Update the DNS records for this domain and Replace existing entries ; if that is not the case, create a A record with your registrar with the following information:
- field: the full URL address of the subdomain (e.g.
vlog.domain.xyz
) - target: the IPv4 address (A record) of your site (refer to this other guide to find the A record of your site)
- field: the full URL address of the subdomain (e.g.
2. Modify the .htaccess file of your website
Important: the following instructions are given for informational purposes only. You may need to adapt the code to make it work in your situation.
Using your FTP software/client or the FTP Manager, add and adapt the following code in the .htaccess
file located at the root of your website:
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.xyz [NC]
RewriteCond %{DOCUMENT_ROOT}/%1/ -d
RewriteCond %1::%{REQUEST_URI} !^(.*?)::/\1/?
RewriteRule "^(.*)$" "%{DOCUMENT_ROOT}/%1/$1" [L]
Explanation for the third line: https://stackoverflow.com/a/15981056
Replace on the first line:
domain
with your domain namexyz
by the extension of your domain name (ch, fr, etc.)
Now, the address vlog.domain.xyz
should display the content of the vlog
folder located at the root of your website. If this is not the case, check that the vlog
folder actually exists at the root of your website.
This guide explains how to add or modify one or more A and AAAA type records in the DNS zone (of a domain name) managed on the Manager Infomaniak.
Introduction
- This type of record allows a domain name to point to a static IP address (usually a server), type A for IPv4 and AAAA for IPv6.
- This is the method generally used to redirect your domain name to the IP address of the web server where your website is hosted. Moreover, this type of pointing is used automatically to link your domain name with your website if both are in the same place and in the same Infomaniak Organization.
- You should only modify this type of record if you have a specific configuration to implement (e.g., pointing a subdomain to an external application).
Modify the DNS zone
Refer to this other guide to manage this type of record in a DNS zone.
This guide explains how to modify the server configuration of a site on Web Hosting Infomaniak.
Preamble
- Apache is the HTTP server.
- It is configured with a
.htaccess
file placed at the root of the website.
- It is configured with a
- PHP is a programming language used to create dynamic web pages via an HTTP server.
- It is possible to 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.
- It is possible to customize PHP directives with a
- Refer to this other guide regarding the creation of .htaccess & .user.ini files.
Modify the server configuration of a site…
… via the Manager
To modify the PHP configuration and most of the parameters (max_input_vars
, allow_url_fopen
, memory_limit
, post_max_size + upload_max_filesize
, etc.):
- 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 different tabs General, PHP / Apache and PHP Extensions to make the desired adjustments:
Do not forget to save the changes at the bottom of the page.
Refer to this other guide if you are looking for information about limit values and the possibilities of unlocking them.
… via the .user.ini file
For the PHP directives that are not available in the Manager, it is necessary to set 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 the elements with the indication PHP_INI_SYSTEM
in the Modifiable
column as well as max_input_time
, memory_limit
and mysqli.default_socket
are not usable.
... in CLI
To customize PHP directives when running scripts via command line (CLI) or in CRON jobs, it is necessary to specify the desired values in a .user.ini
file.
Next, to apply these configurations, the PHP executable is used with the option -c
followed by the path to the .user.ini
file.
For example, to modify the memory limit available for PHP to 1024M, you can create or modify the .user.ini
file using the following command:
echo 'memory_limit = 1024M' > .user.ini
This command writes the directive memory_limit with the value 1024M in the file .user.ini
.
Then, when running a PHP script via command line or in a CRON job, the PHP command with the -c
option will be used to specify the .user.ini
file containing the custom configurations.
The following example enables allow_url_fopen
for the WP CLI tool (which notably allows retrieving extensions):
php -d allow_url_fopen=On ~/bin/wp package install trepmal/wp-revisions-cli
php
: the PHP executable-d allow_url_fopen=On
: the option-d
allows to set a PHP configuration directive (allow_url_fopen
) with the valueOn
~/bin/wp
: path to the WP CLI executablepackage install trepmal/wp-revisions-cli
: the specific command to install the WP CLI packagetrepmal/wp-revisions-cli
This ensures that the option allow_url_fopen
is enabled during the execution of the specified WP CLI command. Enabling allow_url_fopen
may be necessary for certain operations that involve opening remote URLs, such as downloading extensions or packages. Make sure this option is enabled securely and in accordance with best security practices.
This guide explains how to change the URL of your website from the WordPress app installed on your Web Hosting Infomaniak (only in the case where you have installed WordPress via the dedicated tools offered by Infomaniak).
This allows you to assign a different domain name to your WordPress site.
Prerequisites
- The domain name you wish to use must first be added as an alias to the main domain on the relevant site.
Change the address of a WordPress site
To change the address of the site created with WordPress Infomaniak to another domain name that is already in the same Organization:
- Click here to access the management of your WordPress site on the Infomaniak Manager (need help?).
- If your site does not appear here, it is because it was not installed via Infomaniak tools… refer to the official documentation.
- 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 to the right of the WordPress:
- Under Site URL, select the desired web address from the dropdown menu:
- If you have not followed the prerequisites above, the desired domain will not appear even if it is registered within the same Organization.
- If you have added the domain as an alias for the site, the desired domain will appear and you will be able to select it to replace the previous domain.
- Click on the Save button:
Domain ….preview.infomaniak.website?
Among the URLs present in the dropdown menu, the preview URL allows you to access your WordPress site in case the site's domain name is not yet correctly configured to point to your WordPress app.
This guide explains how…
- … generate a
CSR
and private key to request a third-party certificate from a Certification Authority (CA
), - … import this certificate for your Infomaniak site, using the
CRT
obtained from theCA
.
Preamble
- Although Infomaniak offers all the SSL certificates you might need…
- free Let's Encrypt certs for personal sites (only possible with sites hosted at Infomaniak),
- DV certs from Sectigo for professional/private sites that are not registered in the trade register,
- EV certs from Sectigo for companies registered in the trade register,
- It is also possible to install an SSL certificate obtained elsewhere (intermediate certificate from a certification authority of your choice), custom or self-signed certificates.
1. Generate a CSR (Certificate Signing Request)
A CSR
(Certificate Signing Request
or Certificate Signing Request) is an encoded file containing the information necessary to request an SSL/TLS certificate.
It must be generated on your side to ensure that the private key remains under your control, using for example OpenSSL.
Adapt and run the following command from a terminal application (command line interface, CLI) on your device:
openssl req -utf8 -nodes -sha256 -newkey rsa:2048 -keyout domain.xyz.key -out domain.xyz.csr -addext "subjectAltName = DNS:domain.xyz, DNS:www.domain.xyz"
Explanations
newkey rsa:2048
: Generates a new 2048-bit RSA key.keyout domain.xyz.key
: Specifies the file where the private key will be saved.out domain.xyz.csr
: Specifies the file where the CSR will be saved.addext “subjectAltName = ...”
: Adds additional domains via theSAN (Subject Alternative Name)
extension, necessary to include all desired domains in the certificate (the main domain domain.xyz + any other associated domain or subdomain, such as www.domain.xyz).
After generation, you can check the contents of the CSR with the following command:
openssl req -in domain.xyz.csr -noout -text
This allows you to verify that all domains listed in subjectAltName
are correctly included.
Once the CSR is generated, you can send it to the certification authority (CA
) to obtain your SSL/TLS certificate.
2. Import the external certificate
Once validated, the CA
issues a certificate (domain.xyz.crt
) and sometimes an intermediate certificate (ca_bundle.crt
). To access SSL certificate 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 SSL Certificates in the left sidebar.
- Click the blue Install a certificate button:
- Choose the custom certificate.
- Click on the Next button:
- Import your certificate and private key, either by importing the
.crt
and.key
files or by copy-pasting. - Click on Complete:
Alternative command to generate a self-signed certificate (optional)
If you want a local certificate for testing purposes only or without going through a CA
(not recommended for production), you can use this command:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout domain.xyz.key -out domain.xyz.crt -addext “subjectAltName = DNS:domain.xyz, DNS:www.domain.xyz”
This generates both a self-signed certificate (domain.xyz.crt
) and a private key (domain.xyz.key
). However, self-signed certificates are not recognized as valid by public browsers or systems. They are only suitable for internal or development environments.
Import an intermediate certificate
When adding a custom SSL certificate, it is possible to import the intermediate certificate (by importing the .crt
file or pasting the data provided by the certification authority):
This guide presents commands that can be executed to test a connection or a network and thus further specify the potential source of error.
Perform a Telnet…
TELNET
allows you to test the connection to a server without considering all the additional settings of a mail or FTP application in order to determine the source of a problem. If the connection does not go through on an SMTP server, for example, you will need to check if your firewall is not blocking port 587
or 465
.
… on macOS
- Look for Network Utility.
- Go to the
Ping
,Lookup
orTraceroute
tab depending on what you want to test. - You can also use a terminal application (command line interface, CLI) on your device and, depending on what you want to test, enter:
traceroute [server]
nc [server] [port]
Replace[server]
with the server name or its IP address, same for[port]
…
… on Windows
Enable Telnet in advance if necessary.
- Use a command-line interface (CLI) application like
Terminal
on your device, for example by typing Run thencmd
. - In the window that opens, depending on what you want to test, type:
tracert [server]
telnet [server] [port]
Example:telnet mail.infomaniak.com 587
(allows you to test the SMTP port if your software/email client does not allow sending emails)…
… on Android
- Use the application Simple Telnet Client which allows you to test very simply via 2 fields to fill in (for example
mail.infomaniak.com
and the port143
or993
)…
Perform a PING
PING
allows you to check if a machine is accessible via the Internet. You can also use this tool to ensure you are addressing the correct machine, for example during a DNS change, by checking the IP address obtained. It is possible to perform a ping
on a domain name, a hostname
or an IP address.
Git and GitHub are available at Infomaniak with all hosting offers on…
and of course the Jelastic Cloud offer, which will allow you to deeply integrate versioning.
This guide explains how to resolve issues that may occur with a Web Hosting if it has undergone changes to its IP address (e.g., a server move) and your computer retains the old position in its DNS cache.
Flush the DNS cache…
When you visit a website, your computer locally stores an association between the domain name and its IP address in the DNS cache. This speeds up the DNS resolution process for future visits to the same site, as the computer can avoid querying the DNS servers again to obtain the IP address.
By clearing the DNS cache, you force your computer to query the DNS servers again to obtain the latest up-to-date information on the IP addresses of the sites you visit.
... on Windows
Run the following command from a Terminal
application (command-line interface, CLI /Command Line Interface
) on your device. Example:
- Open the Start menu.
- Type cmd.
- In the search results, click on Command Prompt.
- Run the command
ipconfig /flushdns
.
… on macOS
Run the following command from a Terminal
application (command-line interface, CLI /Command Line Interface
) on your device:
- Run the command
lookupd -flushcache
(if it fails:dscacheutil -flushcache
).
… on Linux
Run the following command from a Terminal
application (command-line interface, CLI /Command Line Interface
) on your device:
- Run the command
sudo systemctl restart nscd
orsudo /etc/init.d/nscd restart
to restart nscd.