NoPaste

vhost1

von schwedenmann
SNIPPET_DESC:
ngingx-vhosts
SNIPPET_CREATION_TIME:
18.09.2017 10:05:22
SNIPPET_PRUNE_TIME:
Unendlich

SNIPPET_TEXT:
  1. server {
  2.  listen 80 ;
  3.  listen [::]:80 ;
  4.  
  5.  # SSL configuration
  6.  #
  7.  # listen 443 ssl default_server;
  8.  # listen [::]:443 ssl default_server;
  9.  #
  10.  # Note: You should disable gzip for SSL traffic.
  11.  # See: https://bugs.debian.org/773332
  12.  #
  13.  # Read up on ssl_ciphers to ensure a secure configuration.
  14.  # See: https://bugs.debian.org/765782
  15.  #
  16.  # Self signed certs generated by the ssl-cert package
  17.  # Don't use them in a production server!
  18.  #
  19.  # include snippets/snakeoil.conf;
  20.  
  21.  root /var/www/meinserver2.local;
  22.  
  23.  # Add index.php to the list if you are using PHP
  24.  index index.html index.htm index.nginx-debian.html;
  25.  
  26.  server_name meinserver2.local;
  27.  
  28.  location / {
  29.  # First attempt to serve request as file, then
  30.  # as directory, then fall back to displaying a 404.
  31.  try_files $uri $uri/ =404;
  32.  }
  33.  
  34.  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  35.  #
  36.  location ~ \.php$ {
  37.  include snippets/fastcgi-php.conf;
  38.  
  39.  # With php7.0-cgi alone:
  40.  # fastcgi_pass 127.0.0.1:9000;
  41.  # With php7.0-fpm:
  42.  fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  43.  }
  44.  
  45.  # deny access to .htaccess files, if Apache's document root
  46.  # concurs with nginx's one
  47.  #
  48.  location ~ /\.ht {
  49.   deny all;
  50.  }
  51. }

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN