Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Send all HTTP to HTTPS
- server {
- listen 80 default_server;
- server_name 127.0.0.1 192.168.1.X 192.168.1.X DOMAIN.com;
- location / {
- #return 301 https://$server_name$request_uri;
- return 301 https://$host$request_uri;
- }
- }
- ssl_session_cache shared:SSL:10m;
- ssl_session_timeout 10m;
- upstream http_backend {
- server 192.168.1.x:8080;
- keepalive 16;
- }
- #####################
- # DOMAIN
- #####################
- server {
- listen 443 ssl http2;
- server_name 192.168.1.x DOMAIN.com;
- root /var/www/html/x;
- index index.php index.html index.htm;
- ssl_certificate /etc/letsencrypt/live/DOMAIN.com-0002/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/DOMAIN.com-0002/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- error_log /var/log/nginx/x.log notice;
- client_max_body_size 64M;
- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- include fastcgi_params;
- }
- location / {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement