Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- # SSL configuration
- ssl_dhparam /etc/ssl/certs/dhparam.pem;
- root /var/www/html;
- # Add index.php to the list if you are using PHP
- index index.php index.html index.htm index.nginx-debian.html;
- server_name myhost my.domain;
- location /nextcloud/ {
- proxy_pass http://127.0.0.1:8080/;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- try_files $uri $uri/ =404;
- }
- client_max_body_size 0;
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/my.domain/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/my.domain/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- # Redirect non-https traffic to https
- if ($scheme != "https") {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement