2021-08-12 02:11:16 +02:00
|
|
|
upstream $domain {
|
|
|
|
server 192.168.9.$ipvm:$port; #Production
|
|
|
|
#server 192.168.9.9; #Redirection maintenance
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
server_name $domain;
|
|
|
|
listen 80;
|
|
|
|
include includes/errors.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
# First attempt to serve request as file, then
|
|
|
|
# as directory, then fall back to displaying a 404.
|
|
|
|
try_files \$uri \$uri/ =404;
|
|
|
|
}
|
|
|
|
|
|
|
|
index index.php;
|
|
|
|
|
|
|
|
# pass PHP scripts to FastCGI server
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
include snippets/fastcgi-php.conf;
|
|
|
|
|
|
|
|
# With php-fpm (or other unix sockets):
|
|
|
|
fastcgi_pass unix:/var/run/php/php-fpm.sock; # Faites le ln -s qui va bien
|
|
|
|
# With php-cgi (or other tcp sockets):
|
|
|
|
#fastcgi_pass 127.0.0.1:9000;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /ipfs {
|
2022-04-18 16:09:28 +02:00
|
|
|
proxy_pass http://127.0.0.1:8080;
|
2021-08-12 02:11:16 +02:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /ipns {
|
2022-04-18 16:09:28 +02:00
|
|
|
proxy_pass http://127.0.0.1:8080;
|
2021-08-12 02:11:16 +02:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
error_log /var/log/nginx/$domain_error.log;
|
|
|
|
access_log /var/log/nginx/$domain_access.log;
|
|
|
|
|
|
|
|
}
|