issue196:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue196:c_c [2023/08/25 18:01] – créée auntiee | issue196:c_c [2023/08/28 18:20] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | As per the previous issue (FCM#194), the instructions are here: https:// | + | **As per the previous issue (FCM#194), the instructions are here: https:// |
At the end of the day, it comes down to which one you prefer, but for what we will be doing, it won't matter, thus I am showing you both sides of the coin. | At the end of the day, it comes down to which one you prefer, but for what we will be doing, it won't matter, thus I am showing you both sides of the coin. | ||
Ligne 7: | Ligne 7: | ||
sudo apt install nginx | sudo apt install nginx | ||
- | Please take your time and follow along on the few pages there are, there is more I want to show you, but take your time, make sure you understand what you are doing. | + | Please take your time and follow along on the few pages there are, there is more I want to show you, but take your time, make sure you understand what you are doing. |
- | Now, while that goes, just know that this method does not allow you to install modules, etc. For that, we need to build it from source. That said, for what we are about to do, it is more than enough. Once the installation has completed we can check to see if all went to plan. Type: | + | La continuation de l’article dans le FCM n° 194... |
+ | |||
+ | Nginx. | ||
+ | |||
+ | Comme dans le numéro précédent, | ||
+ | https:// | ||
+ | |||
+ | Finalement, ce qui compte c’est celui que vous préférez, mais pour ce que nous ferons, cela n’a pas d’importance et, donc, je vous montre les deux côtés de la médaille. | ||
+ | |||
+ | C'est vraiment aussi facile que : sudo apt install nginx | ||
+ | |||
+ | S’il vous plaît, prenez votre temps et suivez-moi le long des quelques pages de cet article, car je veux vous en montrer davantage, mais prenez votre temps et assurez-vous de comprendre ce que vous faites. | ||
+ | |||
+ | **Now, while that goes, just know that this method does not allow you to install modules, etc. For that, we need to build it from source. That said, for what we are about to do, it is more than enough. Once the installation has completed we can check to see if all went to plan. Type: | ||
ps aux | grep nginx | ps aux | grep nginx | ||
Ligne 21: | Ligne 34: | ||
in the terminal. Here you can see mine working (bottom left). | in the terminal. Here you can see mine working (bottom left). | ||
- | You should also see all the config files in /etc/nginx | + | You should also see all the config files in /etc/nginx** |
- | To see the options, you can type: | + | Bon, pendant que l’installation se passe, sachez seulement que cette méthode ne vous permet pas d’installer des modules, etc. Pour cela, nginx doit être compilé à partir des sources. Cela étant dit, pour ce que nous allons faire, il y en a déjà plus qu’assez. Une fois l’installation terminée, nous pouvons vérifier que tout s’est bien passé comme on voulait. Tapez : |
+ | |||
+ | ps aux | grep nginx | ||
+ | |||
+ | Si vous voyez quelque chose qui ressemble à ma copie d' | ||
+ | |||
+ | Lancez votre navigateur et tapez votre adresse IP dans la zone des adresses. Si vous ne connaissez pas votre adresse IP, tapez simplement | ||
+ | |||
+ | ip a | ||
+ | |||
+ | dans le terminal. Ici, vous voyez la mienne qui travaille (en bas à gauche). | ||
+ | |||
+ | Vous devriez également voir tous les fichiers de configuration dans / | ||
+ | |||
+ | **To see the options, you can type: | ||
nginx -? | nginx -? | ||
Ligne 39: | Ligne 66: | ||
(so if it misbehaves, you can restart the service at any time.) | (so if it misbehaves, you can restart the service at any time.) | ||
- | This is a bit of an image heavy edition, but I know I want to see that mine is exactly like the person showing me - so look at the image below. | + | This is a bit of an image heavy edition, but I know I want to see that mine is exactly like the person showing me - so look at the image below. |
- | We may need to start the service next time we boot, but that’s OK. I don’t want mine running all the time. If you do, then use systemctl enable. | + | Pour voir les options, vous pouvez taper : |
+ | |||
+ | nginx -? | ||
+ | |||
+ | À n’importe quel moment, vous pouvez afficher le site Web de nginx pour avoir de l’aide. | ||
+ | https:// | ||
+ | |||
+ | Disons que vous l' | ||
+ | |||
+ | Nous continuerons sous Ubuntu. Puisque nginx s’exécute comme un service, vous pouvez le vérifier à tout moment avec la commande systemctl. | ||
+ | |||
+ | Tapez : | ||
+ | |||
+ | systemctl status nginx | ||
+ | |||
+ | (Ainsi, s’il se comporte mal, vous pouvez redémarrer le service à n’importe quel moment.) | ||
+ | |||
+ | Cet article a beaucoup d’images, mais je sais que je veux ainsi voir que la mienne est exactement semblable à celle de la personne qui me la montre – vous devez donc regarder l’image ci-dessous. | ||
+ | |||
+ | |||
+ | **We may need to start the service next time we boot, but that’s OK. I don’t want mine running all the time. If you do, then use systemctl enable. | ||
If you do not see the welcome to nginx static page, you may need to start/ | If you do not see the welcome to nginx static page, you may need to start/ | ||
Ligne 49: | Ligne 96: | ||
I am going to use nano, my preference, you can use whatever editor you have installed (see image below). | I am going to use nano, my preference, you can use whatever editor you have installed (see image below). | ||
- | Or use vi as per the instructions (bottom right). | + | Or use vi as per the instructions (bottom right).** |
- | OK, step 4 is creating a virtual host. The virtual host will serve something static from a directory on our machines. This is where I need to point out our first deviation. I do not see nginx.conf, usually this is the file I edit, but let’s run with the tutorial. | + | |
+ | On devra peut-être démarrer le service la prochaine fois que l'on allumera l' | ||
+ | |||
+ | Si vous ne voyez pas la page statique welcome to nginx, vous devrez sans doute démarrer/ | ||
+ | |||
+ | Étape 3, (https:// | ||
+ | |||
+ | J' | ||
+ | |||
+ | Ou utilisez vi, comme indiqué dans les instructions (en bas à droite). | ||
+ | |||
+ | |||
+ | **OK, step 4 is creating a virtual host. The virtual host will serve something static from a directory on our machines. This is where I need to point out our first deviation. I do not see nginx.conf, usually this is the file I edit, but let’s run with the tutorial. | ||
Please have a look at the default file in the path / | Please have a look at the default file in the path / | ||
- | Check yours against mine as per the image top right. | + | Check yours against mine as per the image top right. |
- | Troubleshooting time. Type nginx -t to diagnose any configuration errors. | + | Bon, la quatrième étape est la création d’un hôte virtuel. Cet hôte virtuel servira quelque chose de statique à partir d’un répertoire sur votre machine. C’est ici qu’il faudra que je vous indique notre première déviation. Je ne vois pas nginx.conf et, habituellement, |
+ | |||
+ | Veuillez regarder le fichier par défaut dans le chemin / | ||
+ | |||
+ | Vérifiez le vôtre avec le mien comme montré dans l’image en haut à droite. Eeeeeet, tout comme dans le tutoriel Ubuntu précédent, | ||
+ | |||
+ | **Troubleshooting time. Type nginx -t to diagnose any configuration errors. | ||
However, this time it did not work as I was slow. We edited our file to point to port 81, not the default 80, so we need to append :81 to the end of the IP address in the url. | However, this time it did not work as I was slow. We edited our file to point to port 81, not the default 80, so we need to append :81 to the end of the IP address in the url. | ||
Ligne 63: | Ligne 128: | ||
Now I feel so much better showing you BOTH ways, so meet me next time for another CnC. | Now I feel so much better showing you BOTH ways, so meet me next time for another CnC. | ||
- | As always comments to: misc@fullcirclemagazine.org | + | As always comments to: misc@fullcirclemagazine.org** |
+ | |||
+ | On doit maintenant trouver le problème. Tapez nginx -t pour diagnostiquer toute erreur de configuration. | ||
+ | |||
+ | Cependant, cette fois-ci, cela n’a pas fonctionné à cause de ma lenteur. Nous avons édité notre fichier pour pointer vers le port 81, et pas le port 80 par défaut, et nous devons donc ajouter :81 au bout de l’adresse IP dans l’URL. | ||
+ | |||
+ | Je me sens beaucoup mieux maintenant que je vous ai montré les DEUX façons de faire, alors rendez-vous la prochaine fois pour un autre C&C. | ||
+ | |||
+ | Comme toujours, envoyez vos commentaires à | ||
issue196/c_c.1692979269.txt.gz · Dernière modification : 2023/08/25 18:01 de auntiee