Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
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 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 application Windows App (formerly Microsoft Remote Desktop).
- … on Linux: install the application Remmina.
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.
This guide explains how to customize the limits of a site hosted on a Web Hosting or a Cloud Server.
Unlock or adjust the limits of a site
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.
You will be able to:
- Unlock for 60 minutes the memory limit (
memory_limit
= 1280 MB) and the maximum script execution time (max_execution_time
= 60 minutes):- This unlock is possible a maximum of 10 times per year.
- Customize the limits of:
max_execution_time
(in seconds)memory_limit
(in MB)post_max_size
&upload_max_filesize
(maximum file size for upload, in Mo)- Cloud Server only:
Max children
(refer to this other guide) - Cloud Server only:
Max input time
Do not forget to save the changes at the bottom of the page.
Maximum values by hosting type
Limits | Shared | Cloud Server | CLI (Cloud Server only) |
---|---|---|---|
max_execution_time | 300 s | 3600 s | 0 (unlimited) s max |
memory limit | 1280 MB | 2048 MB max | 512 MB max |
post_max_size + upload_max_filesize | 9223372036854775807 Mo max | 9223372036854775807 Mo max | 48 MB max |
max_children | 20 max | 20 (default, modifiable) | |
simultaneous connections per IP | 30 max | 30 (default, modifiable) | |
maximum input time | 0 (unlimited) | 0 (default, modifiable) | 0 (unlimited) |
files (inodes) | no limit on the number of files per hosting |
This guide helps resolve an error of type "Invalid query: MySQL server has gone away
".
Preamble
- This type of error often occurs when a MySQL connection is kept open without submitting queries for a period of time beyond which the connection is closed: http://dev.mysql.com/doc/refman/5.7/en/gone-away.html
- The variables
wait_timeout
andinteractive_timeout
that control this disconnection are set to 30 seconds: http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html
Solutions
To avoid the "MySQL server has gone away" error, here are several possible approaches:
Automatic verification and reconnection
Before executing a query, it is recommended to test if the MySQL connection is still active. If the connection has been closed, you can re-establish it automatically before proceeding with your query. Here is an example in PHP:
if (!mysqli_ping($connexion)) {
mysqli_close($connexion);
$connexion = mysqli_connect($host, $user, $password, $database);
}
The function mysqli_ping()
checks if the connection is still valid. If it is not, the script closes the connection and opens a new one.
Sending regular "Pings
Another method involves running a script that regularly sends a "ping" to the database to keep the connection active. For example, you could create a scheduled task (cron job) that sends a light query, such as SELECT 1;
at regular intervals.
Adjusting MySQL parameters (Cloud Server)
With a Cloud Server, you can increase the values of the variables wait_timeout
and interactive_timeout
from the MySQL menu of your server to extend the duration of the connection before it is closed.
This guide is for you if you wish to perform vulnerability tests on your site/server hosted by Infomaniak.
Allowed and restricted
You are free to perform vulnerability tests (SQL injection, XSS, etc.), intrusion, or penetration testing (pentest) on your Infomaniak hosting only under the following conditions:
- … between 9 AM and 5 PM CET
- … from Monday to Friday
- … with the minimum number of attack packets, regardless of the software used (AppScan, for example)
- … never performing a single DoS or DDoS (Denial of Service) attack
- … by respecting the TOS of Infomaniak, particularly the shared services framework
This guide explains how to create a PTR record on the dedicated IPs of VPS Cloud / VPS Lite.
Preamble
- A PTR (Pointer Record) is a type of DNS record used to resolve IP addresses into domain names.
- The PTR record is used to associate an IP address with a domain name or subdomain.
- This is the opposite of the A record which is used to resolve domain names into IP addresses.
Create a PTR on the VPS Cloud / VPS Lite IP
If you have a VPS Cloud / VPS Lite and you want to create a PTR record for your dedicated IP address, here are the steps to follow:
- Make sure your domain or subdomain points to the IP address (v4 or v6) of your VPS Cloud / VPS Lite server.
- You can do this by creating an A record for your domain or by modifying the existing record to point to the IP address of your VPS Cloud / VPS Lite.
- Check that your domain is correctly pointing to the IP address of your VPS Cloud / VPS Lite (see 1).
- Contact Infomaniak support to request the creation of a PTR record for your dedicated IP address.
- Mention the IP address of your VPS Cloud / VPS Lite server (you can find this IP address in your server management dashboard or by using a command line command like "
ifconfig
" or "ipconfig
" depending on the operating system you are using).
- Mention the IP address of your VPS Cloud / VPS Lite server (you can find this IP address in your server management dashboard or by using a command line command like "
- Once the PTR record is created, use an online verification tool to ensure that the PTR record points to your domain or subdomain.
This guide explains how to connect to an external database from a Cloud Server.
Preamble
- It is possible to connect to MySQL via SSL (external or not) - this must be specified when establishing the connection.
- The MySQL port
3306
is closed by default - to open it, refer to this other guide. - Infomaniak does not install
PDO_DBLIB
.
Install PHP_PDO_ODBC
Prerequisites
- Have the PHP Extensions menu on the Infomaniak Manager in the Cloud Server section (if not, it will be necessary to upgrade the Cloud Server).
It is possible to install the PHP_PDO_ODBC
extension from the PHP Extensions menu of your Cloud Server:
- Click here to access the management of your product on the Manager Infomaniak (need help?).
- Click directly on the name assigned to the relevant product.
- Click on PHP Extensions in the left sidebar.
- Click on the blue button Install an extension.
- Select the extension
PHP_PDO_ODBC
. - Confirm the installation.
Configure the connector
The driver configuration is already defined in /etc/odbcinst.ini
:
[FreeTDS]
Description = MS SQL database access with Free TDS Driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
There is no need to redefine it statically in the .odbc.ini
or in the user's home directory ‍~~/.odbc.ini‍
or also dynamically in the PHP code.
Example with the driver FreeTDS
defined in advance, it is also necessary to specify the version of the driver at the end of the pdo
object declaration:
$con = new PDO('odbc:Driver=FreeTDS;Server=__SERVER IP__;Port=3306;DATABASE=__DATABASE NAME__;UID=__USERNAME__;PWD=__PASSWORD__;TDS_Version=8.0');
This guide explains how to obtain information about the presence of a caching system on a site using the curl
command.
Introduction
- In the world of programming and system administration, it is often necessary to determine if a website uses a caching system to improve its performance.
- Caching systems like Fastly are commonly used to temporarily store data to serve it faster to users.
- By following these steps, you will be able to determine if a website uses a caching system to improve its performance and understand the operation and optimization of sites.
Using the curl command
curl
is a command-line tool for transferring data using URLs.
The option -svo /dev/null
is used to perform a silent request (-s
), display detailed information about the request (-v
), and redirect the output data to /dev/null
to ignore it (/dev/null is a special device on Unix/Linux systems that behaves like a trash can). -H "Fastly-Debug: true"
is an HTTP header added to the request to ask for debugging information specific to Fastly.
Run the command
Run the following command from a terminal application (command line interface, CLI) on your device:
curl -svo /dev/null [url] -H “Fastly-Debug: true”
and replace [url]
with the address of the website you want to check.
If the site uses Fastly or another similar caching system, you will see specific debugging information in the command output. The details provided may include information about HTTP requests and responses, as well as information about the cache and performance.