Outils pour utilisateurs

Outils du site


public:doc:nginx_repair-cafe.liberespace.org_hermes.liberespace.org

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
public:doc:nginx_repair-cafe.liberespace.org_hermes.liberespace.org [2018/02/05 21:14]
Adelin
public:doc:nginx_repair-cafe.liberespace.org_hermes.liberespace.org [2018/02/10 17:33]
Adelin
Ligne 145: Ligne 145:
 Souhaitez-vous continuer ?​ [O/n] Souhaitez-vous continuer ?​ [O/n]
 </​code>​ </​code>​
 +
 +  # cat /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +
 +<​file>​
 +server {
 +  listen 80;
 +  listen [::]:80;
 +  ​
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +  ​
 +  return 301 https://​repair-cafe.liberespace.org$request_uri;​
 +
 +}
 +
 +server {
 +  listen 443 ssl;
 +  listen [::]:443 ssl;
 +
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +
 +  root /​srv/​repair-cafe.liberespace.org;​
 +  index index.html;
 +
 +  include /​etc/​letsencrypt/​options-ssl-nginx.conf;​
 +
 +  ssl_certificate /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​fullchain.pem;​
 +  ssl_certificate_key /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​privkey.pem;​
 +
 +  location / {
 +    try_files $uri $uri/ =404;
 +  }
 +
 +}
 +
 +</​file>​
 +
 +  # sed -i "​s#​index index.html;#​index index.html index.php;#"​ /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +  # sed -i "​s# ​ location / {#  location ~ \.php$ {\n    include snippets/​fastcgi-php.conf;​\n ​   fastcgi_pass unix:/​var/​run/​php/​php7.0-fpm.sock;​\n ​ }\n\n  location / {#" /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +  # systemctl restart nginx
 +
 +  # cat /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +
 +<​file>​
 +server {
 +  listen 80;
 +  listen [::]:80;
 +  ​
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +  ​
 +  return 301 https://​repair-cafe.liberespace.org$request_uri;​
 +
 +}
 +
 +server {
 +  listen 443 ssl;
 +  listen [::]:443 ssl;
 +
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +
 +  root /​srv/​repair-cafe.liberespace.org;​
 +  index index.html index.php;
 +
 +  include /​etc/​letsencrypt/​options-ssl-nginx.conf;​
 +
 +  ssl_certificate /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​fullchain.pem;​
 +  ssl_certificate_key /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​privkey.pem;​
 +
 +  location ~ .php$ {
 +    include snippets/​fastcgi-php.conf;​
 +    fastcgi_pass unix:/​var/​run/​php/​php7.0-fpm.sock;​
 +  }
 +
 +  location / {
 +    try_files $uri $uri/ =404;
 +  }
 +
 +}
 +
 +</​file>​
 +
 +
 +===== Adelin PIAU 2018-02-10 =====
 +
 +==== Conf Nginx ====
 +
 +  # sed "​s#​location / {#include /​etc/​nginx/​sites-available/​access_repair-cafe.conf;​\n\n ​ location / {#" /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +  # cat /​etc/​nginx/​sites-available/​repair-cafe.liberespace.org.conf
 +
 +<​file>​
 +server {
 +  listen 80;
 +  listen [::]:80;
 +  ​
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +  ​
 +  return 301 https://​repair-cafe.liberespace.org$request_uri;​
 +
 +}
 +
 +server {
 +  listen 443 ssl;
 +  listen [::]:443 ssl;
 +
 +  server_name repair-cafe.liberespace.org;​
 +
 +  access_log /​var/​log/​nginx/​repair-cafe.liberespace.org_access.log;​
 +  error_log /​var/​log/​nginx/​repair-cafe.liberespace.org_error.log;​
 +
 +  root /​srv/​repair-cafe.liberespace.org;​
 +  index index.html index.php;
 +
 +  include /​etc/​letsencrypt/​options-ssl-nginx.conf;​
 +
 +  ssl_certificate /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​fullchain.pem;​
 +  ssl_certificate_key /​etc/​letsencrypt/​live/​repair-cafe.liberespace.org/​privkey.pem;​
 +
 +  location ~ .php$ {
 +    include snippets/​fastcgi-php.conf;​
 +    fastcgi_pass unix:/​var/​run/​php/​php7.0-fpm.sock;​
 +  }
 +
 +  include /​etc/​nginx/​sites-available/​access_repair-cafe.conf;​
 +
 +  location / {
 +    try_files $uri $uri/ =404;
 +  }
 +
 +}
 +
 +</​file>​
 +
 +  # editor /​etc/​nginx/​sites-available/​access_repair-cafe.conf
 +
 +<​file>​
 +# accès
 +location ~ /​blog/​update.*$ {
 +    deny all;
 +    return 404;
 +}
 +location ~ /​blog/​data/​(articles|commentaires|configuration|statiques|index.html).*$ {
 +    deny all;
 +    return 404;
 +}
 +</​file>​
public/doc/nginx_repair-cafe.liberespace.org_hermes.liberespace.org.txt · Dernière modification: 2018/02/10 17:33 par Adelin