====== VHOST ======
server {
client_max_body_size 20M;
listen 80; ## listen for ipv4
server_name xxxxx.org www.xxxxxx.org;
access_log /var/log/nginx/xxxxx.access.log;
error_log /var/log/nginx/xxxxx.error.log;
location / {
root /uuuuu/zzzzzz/xxxxx/www;
index index.html index.htm index.php;
}
location /prive {
root /uuuuu/zzzzzz/xxxxx/www;
index index.html index.htm index.php;
auth_basic "Restricted Access";
auth_basic_user_file /home/admin/list-users;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
#fastcgi_pass 127.0.0.1:9988;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /uuuuu/zzzzzz/xxxxx/www$fastcgi_script_name;
}
}
server {
server_name mysite.domain.com;
location / {
include proxy_params;
proxy_pass http://server2.domain.com;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mysite.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mysite.domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}