« Nginx and Ubuntu » : différence entre les versions
Apparence
(3 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
[[Category:Ubuntu]] | [[Category:Ubuntu]] | ||
= Links = | |||
* [[Nginx]] | |||
= Install = | = Install = | ||
<kode lang='bash'> | <kode lang='bash'> | ||
Ligne 33 : | Ligne 36 : | ||
</filebox> | </filebox> | ||
== .NET == | == [[Nginx#.Net_Core|.NET]] == | ||
== [http://wiki.nginx.org/MediaWiki Mediawiki] == | == [http://wiki.nginx.org/MediaWiki Mediawiki] == | ||
Ligne 226 : | Ligne 214 : | ||
} | } | ||
</filebox> | </filebox> | ||
= [https://ubuntu.com/server/docs/how-to-use-nginx-modules Modules] = | |||
<kode lang='bash'> | |||
# list available and enable modules | |||
ls /etc/nginx/modules-* | |||
# install GeoIP2 HTTP module for Nginx (auto enabled after install) | |||
apt install libnginx-mod-http-geoip2 | |||
</kode> |
Dernière version du 18 mai 2024 à 13:42
Links
Install
ai nginx php-fpm
# check nginx and php-fpm are running
sc-status nginx
sc-status php8.2-fpm
|
Site configuration
# enable a web site
sudo ln -s /etc/nginx/sites-available/phpinfo.conf /etc/nginx/sites-enabled/phpinfo.conf
sc-reload nginx
|
php
/etc/nginx/sites-available/phpinfo.conf |
server {
server_name phpinfo.net;
listen 80;
root /var/www/php;
index info.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php-fpm.sock;
}
}
|
.NET
Mediawiki
/etc/nginx/site-availables/mediawiki.conf |
Nextcloud
/etc/nginx/sites-available/nextcloud.conf |
Modules
# list available and enable modules
ls /etc/nginx/modules-*
# install GeoIP2 HTTP module for Nginx (auto enabled after install)
apt install libnginx-mod-http-geoip2
|