Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.htaccess
.idea
robots.txt
10 changes: 5 additions & 5 deletions cesiumVersions.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

$cesiumVersions = [
'home' => '1.7.6',
'android' => '1.7.6',
'debian' => '1.7.6',
'home' => '1.7.13',
'android' => '1.7.13',
'debian' => '1.7.13',
'arch' => '1.6.1',
'windows' => '1.7.6',
'web' => '1.7.6'
'windows' => '1.7.13',
'web' => '1.7.13'
];
1 change: 1 addition & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Duniter : 78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8
// Cesium : CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX
define('FUNDING_TARGET', 20*60+230);
define('CESIUM_PLUS_NODE', 'https://g1.data.e-is.pro'); // for avatars serving

$legalNotice =
[
Expand Down
120 changes: 99 additions & 21 deletions doc/en/install.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,115 @@
How to install Cesium website on your computer
===

## How to install the web server le serveur web

To run Cesium website on your computer, you will need install a web server, and PHP ; the later converts the source code contained in *.php files into HTML the browser can understand.
## (optional) Configure multilang

Linux users will need two packages:
```
# Root, on Debian
echo -e "ca_ES.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nen_GB.UTF-8 UTF-8\neo UTF-8\nes_ES.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
update-locale
service php*-fpm restart
```

## config.php

In ̀`config.php`, edit $rootURL var according to your setup.

```php
if ($_SERVER['SERVER_NAME'] == 'localhost') {
// Adaptez la ligne suivante à votre configuration (sans slash à la fin)
$rootURL = '/cesium_website';
} else {
$rootURL = '';
}
```

## Installer PHP

To run Cesium website on your computer, you will need install and PHP, which converts the source code contained in *.php files into HTML the browser can understand.


Windows users can use [WAMP Serveur](https://www.wampserver.com/), which comes with a web server

## How to install a web server

To run Cesium website on your computer, you will also need a web server

You can choose one of the following:
- apache2
- php
- nginx

## Nginx

Linux users will have to install the `nginx` package.

For instance, Debian-like (Ubuntu, Linux Mint, etc.) users will have to run:

```
sudo apt install apache2 php
sudo apt install nginx
```

Windows users can use [WAMP Serveur](https://www.wampserver.com/).
Go to `/etc/nginx/sites-available/`.

Edit the `default` file to add the bloc that follows `# Configuration for /cesium_website`.

The `/var/www/localhost` part is assuming this is where is stored `cesium_website` (`localhost` would probably be a symbolic link).

```txt
server {

listen 80;

root /var/www/localhost;

index index.php index.html index.htm index.nginx-debian.html;

server_name localhost;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

## .htaccess
# Configuration for /cesium_website
location /cesium_website {

if (!-e $request_filename) {

rewrite ^/cesium_website/([^/]+)/(.*)$ /cesium_website/index.php?lang=$1&page=/$2 last;
rewrite ^/cesium_website/([^/]+)$ /cesium_website/index.php?lang=fr&page=/$1 last;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Assurez-vous de vérifier et d'utiliser la version correcte de PHP
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
```

Note : don't forget to change `php8.1` for the version of PHP you installed.

Restart nginx :
```
sudo service nginx restart
```

## Apache

Linux users will have to install the `apache2` package.

For instance, Debian-like (Ubuntu, Linux Mint, etc.) users will have to run:

```
sudo apt install apache2
```

### .htaccess

Create a .htaccess in cesium_website directory, with the following text :

Expand Down Expand Up @@ -62,17 +154,3 @@ with :
Require all granted
</Directory>
```

## config.php

In ̀`config.php`, edit $rootURL var according to your setup.

## Configure multilang

```
# Root, on Debian
echo -e "ca_ES.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nen_GB.UTF-8 UTF-8\neo UTF-8\nes_ES.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
update-locale
service php*-fpm restart
```
Loading